1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-07 06:43:34 +00:00
Commit graph

334 commits

Author SHA1 Message Date
bjorn 7e1527ddca (Ab)use calloc for OpenVR controller models;
Avoids a potential invalid call to free on destroy.
2018-11-12 19:00:17 -08:00
mcc a46b4afbb8 Split out the "oculus mobile" headset type into GEAR and GO. 2018-11-07 14:34:51 -05:00
mcc 2675b51013 Make oculus mobile build self-contained
The initial version of the oculus mobile driver incorporated two files, BridgeLovr.cpp and BridgeLovr.h, which were assumed to be outside of the Lovr repo in the repo for a separate Android app. The Android app now is wholly separated and communicates with the Lovr shared object via the interface in oculus_mobile_bridge.h.

A file print_override.c now contains a drop-in replacement for Lua print() which prints to lovrLog. This is useful for Android or for other future platforms where stdout/stderr aren't usable.
2018-11-07 10:24:44 -05:00
mcc d8de87d789 Fix headset and controller poses 2018-11-06 15:56:27 -05:00
mcc bf7fd349e2 Fix math bug in glfwSetTime 2018-11-06 11:28:45 -05:00
mcc 8301bd7dd8 Remerge oculus-mobile branch with master 2018-11-02 18:10:08 -04:00
mcc 428995b54b Controller support (orientation wrong currently) and time/dt support 2018-11-02 17:35:24 -04:00
bjorn f8011f7bf7 Initial platform.h; 2018-10-29 14:00:16 -07:00
bjorn 5f990d8c9f Attempt to fix state.offset;
The goal is to ensure that (for 3DOF devices) all poses are reported
to include the state.offset vertical transform applied to them.  Previously,
only rendering was using state.offset.

This is important to fix spatial audio.

Is doing this in every driver problematic?  What if we did it in the
Lua bindings?  That way it could be handled in one place.
2018-10-29 10:36:58 -07:00
mcc 79b0c19254 Oculus mobile: First round of fixes requested in PR review
Formatting, back out bad change to Win32 build, support getOs()
2018-10-28 22:55:37 -04:00
mcc 9328542ff5 Correct usage of conf "offset" and getOriginType in Oculus Mobile
Also whitespace cleanup
2018-10-28 17:16:48 -04:00
mcc dba6724915 Framebuffer and depthbuffer should also be passed into the canvas create-from-handle 2018-10-27 23:11:11 -04:00
mcc c68c850157 Give lovrCanvasCreateFromHandle the option of not deleting framebuffer on canvas delete, also fix default texture issue 2018-10-27 22:15:49 -04:00
mcc d17dec1b0e Graphics now draw, although head tracking is not correct 2018-10-26 01:05:28 -04:00
mcc 5ad8fdd3e3 Fixes as far as running without crashes, no display yet 2018-10-24 23:40:11 -04:00
mcc 56f8f1e26b Untested merge of Oculus Mobile branch and Oct 2018 lovr master 2018-10-22 10:44:04 -04:00
bjorn 897a09c4d7 Why are you here; 2018-10-21 09:18:58 -07:00
bjorn 518d26aad8 getDisplayDimensions: Use unsigned ints;
Fixes a warning.
2018-10-21 08:40:57 -07:00
bjorn 7b9d66e845 Fix openvr warning; 2018-10-21 08:11:07 -07:00
mcc 1b7942e02f First pass oculus mobile support
First of several commits, this is the state of hg:6b437880cc01 in my private repo. A version of shakesoda's Oculus-desktop support is tied up in this commit.

The oculus mobile version builds lovr as a library. To run it, you need to use a separate repo which includes this one and which builds an Android app.
2018-10-20 15:22:24 -04:00
bjorn da3bb42db4 Fix WebVR prototype; 2018-10-09 18:03:53 -07:00
bjorn e1d980a2d6 Re-add lovr.headset.getBoundsGeometry;
Looks like more runtimes are starting to support it.
2018-10-09 17:51:05 -07:00
bjorn 28c56f959d Use MAT4_IDENTITY macro; 2018-10-06 21:58:40 -07:00
bjorn 4279cf086f mat4_invertPose;
~3.9x
2018-10-06 21:21:25 -07:00
bjorn 5e65ac019e OpenVR organization; 2018-10-06 18:15:32 -07:00
bjorn e36d3d8352 openvr: Use WaitGetPoses in update; 2018-10-06 16:54:25 -07:00
bjorn 7976805415 openvr/oculus support individual eye mirroring; 2018-09-30 18:58:51 -07:00
bjorn a9e92b5185 Add ability to mirror specific eyes;
Doesn't work yet for OpenVR/Oculus.
2018-09-30 18:58:51 -07:00
bjorn cfac548e7b Add flag to make Canvas depth texture readable;
- DepthFormat is now just TextureFormat.
- Canvas:getDepthTexture instead of Canvas:getDepthFormat.
2018-09-27 18:34:43 -07:00
bjorn 2ec5c42f87 Fix compile warnings; 2018-09-21 23:34:15 -07:00
bjorn 5a9cd5187c Make CMakeLists more modular;
- Enable/disable individual modules, including enet/json
- Enable/disable different "backends" (audio/headset)
- Choose to use system vs. source versions of different libraries
2018-09-21 19:25:48 -07:00
mcclure e2ace89b83 Fix controller:isDown() for 'grip' and 'trigger' on Oculus (#60)
Previously, controller:isDown('grip') returned always true, and for 'trigger' false was always returned. This adjusts oculusControllerIsDown() to use an axis threshold rather than the Shoulder bit for 'trigger', and to use a more demanding threshold for 'grip'.
2018-09-21 19:23:00 -07:00
bjorn 09a67949ed Improve CMake and build for LibOVR; 2018-09-11 15:47:03 -07:00
bjorn 72158f103a Update for stereo rendering and new headset API; 2018-09-11 15:30:31 -07:00
bjorn 5b5e9fbc00 WIP; 2018-09-11 15:30:31 -07:00
bjorn 6b0806d04a Don't treat lighthouses as Controllers; 2018-09-11 15:28:31 -07:00
bjorn 7309ac8ce8 Treat trackers and lighthouses as Controllers; 2018-09-11 15:23:46 -07:00
bjorn 9fa18495f2 Fix fake controller positioning; 2018-09-05 06:31:18 -07:00
bjorn b29a2d0471 Rework fake headset driver inertia; 2018-09-01 20:29:17 -07:00
bjorn ea331a12be Fix bugs; 2018-08-31 23:24:59 -07:00
bjorn ce2dfb523e Make window mono by default;
The window is now mono by default to make the error screen better and better enable non-stereo uses.  The Camera can now request that the window be treated as stereo.
2018-08-29 21:22:13 -07:00
bjorn 0dbdc78c87 Fix fake driver projection; 2018-08-29 21:22:13 -07:00
bjorn 06fa846680 Resolve supports multiple color attachments; 2018-08-29 21:22:12 -07:00
bjorn 6104d3362e OpenVR MSAA flags; 2018-08-29 21:22:12 -07:00
bjorn 3fb1b49549 MSAA canvases/textures but no resolving yet; 2018-08-29 21:22:12 -07:00
bjorn 36ec69e244 Fix pointer cast; 2018-08-29 21:21:38 -07:00
bjorn 590668a8d6 lovrGraphicsBlit; 2018-08-29 21:21:38 -07:00
bjorn 26f411f43f Other headset drivers use stereo display dimensions; 2018-08-29 21:20:01 -07:00
bjorn 0af2704e5c openvr canvas changes; 2018-08-29 21:20:01 -07:00
bjorn 21a869cc8b Clean up; 2018-08-29 21:19:41 -07:00