Commit Graph

15 Commits

Author SHA1 Message Date
bjorn 92400df89d lovr.headset.init -> lovr.headset.start;
- We need some headset initialization to happen upfront
- But we still want some delayed initialization for when graphics is ready
- Go back to headset initialization happening when module is required
- Add lovr.headset.start that can be used for post-graphics init
2021-06-10 17:26:15 -06:00
Jakob Bornecrantz 70ef04e595 Add overlay parameter to headset init 2021-04-16 14:20:05 -06:00
bjorn 046762c564 WebXR: Fix isDown; Fix hand tracking; 2021-04-10 19:41:37 -06:00
bjorn 923498a927 webxr: also support velocity of head device; 2021-03-31 22:47:26 -06:00
bjorn 72403de209 webxr: Add support for lovr.headset.getVelocity; 2021-03-31 22:37:29 -06:00
bjorn 0cb8a004d3 webxr.js: update emscripten dynCall syntax; 2021-01-25 14:02:15 -07:00
bjorn 98f481e941 WebXR input fixes; 2020-10-02 15:57:42 -06:00
bjorn e14db6c671 Fixes from webxr testing; 2020-09-29 23:41:42 -06:00
bjorn caca0ef71c t.headset.supersample;
Can be used to change the size of the headset texture that gets
submitted to the VR runtime.  It can be a boolean or a number.
2020-09-25 15:41:30 -07:00
bjorn f1447fd69a lovr.graphics.get/setViewPose; lovr.graphics.get/setProjection; 2020-09-24 19:03:37 -07:00
bjorn e50835260a Clean up WebXR;
- Pointer lock
- wasPressed/wasReleased
- Cleanup
2020-08-21 04:37:38 -06:00
bjorn 6cadcea65d WebXR updates;
- Make the renderloop synchronous by hijacking the RAF to run on the
  XRSession when active.
- Convert os_web to use emscripten's native HTML5 interface instead
  of going through GLFW.
- Stop using preinitialized GL context -- lovrPlatformCreateWindow
  now creates the context.
- GLES2/3 emulation is not necessary.
- Remove inline sessions.  The VR simulator is used to render to the
  Canvas instead.  webxr_attach and webxr_detach are used to replace
  replace the active headset driver with the webxr driver when an
  immersive session starts.
- Add noop desktop_getSkeleton.
2020-08-20 13:28:07 -06:00
bjorn 65470f1e0e Update webxr driver; rm webvr; 2020-08-16 00:31:20 -06:00
bjorn 7e941cd22f lovr.headset.animate; Animated OpenVR controller models;
- lovr.headset.newModel accepts an optional options table as the
  second argument.  There is currently a single option named
  'animated' that can be used to request an animatable model.
  Currently it isn't clear if this should be a hint or not.
- lovr.headset.animate (name pending) can be called with a device
  and a model (usually with an animated model from headset.newModel,
  but this is not required).  The function attempts to animate the
  Model to match the pose of the device in an opaque driver-specific
  way, and returns whether or not this was successful.
- OpenVR has models for controllers with a system called "components"
  that can be used to animate the individual buttons.  Now the OpenVR
  headset driver implements the 'animate' function to make use of the
  controller components, to easily load and render animated controllers.
2020-08-05 15:05:59 -06:00
bjorn 6f6de92d19 Add preliminary WebXR backend; 2020-03-04 22:47:24 -08:00