Commit Graph

3222 Commits

Author SHA1 Message Date
bjorn 5ab8dffd8d Fix OpenXR axis actions;
2D axes can't be used as 2D actions and instead need to be represented
as two 1D axes.  Also fixup oculus touch / valve index action paths.
2020-08-23 16:11:20 -06:00
bjorn 9f769470e6 Fix OpenXR OpenGL swapchain type; 2020-08-23 16:10:57 -06:00
bjorn ba3d10dd60 OpenXR: Make action names snake case;
Capital letters are not valid for action names.
2020-08-23 15:33:02 -06:00
bjorn 0439c932ce openxr: Move actions into resources; 2020-08-22 15:40:52 -06:00
bjorn 3cb291c866 rm leap motion driver;
Planning on using the new Ultraleap OpenXR API layer.  It's possible
that this will be added back if that doesn't work out.
2020-08-22 14:05:40 -06:00
bjorn 19cf537726 Clean up tracking driver initialization; 2020-08-22 13:42:52 -06:00
bjorn a055caaae4 Fix file permissions; 2020-08-22 13:36:39 -06:00
bjorn 8973730d8a openvr_getSkeleton;
Untested
2020-08-22 13:33:06 -06: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 4a8e8ae2a9 Rename SUPER key to OS internally; 2020-08-19 14:03:06 -06:00
bjorn 6fd80d10a1 rm unused window argument in errhand; 2020-08-19 14:01:31 -06:00
bjorn ec257b179f Support Lua 5.2, 5.3, 5.4; 2020-08-19 13:12:57 -06:00
bjorn f364fe030b Make Windows platform functions more private; 2020-08-18 21:21:35 -06:00
bjorn 1ca7aeb94e Reset font pixel density in errhand; 2020-08-18 21:15:31 -06:00
bjorn 17ce02d429 Fix OpenXR compile errors and add some android support; 2020-08-18 21:10:06 -06:00
bjorn 80f9514295 Shader:sendImage only checks srgb flag for RGBA textures;
It doesn't need to check it for RGB and compressed textures because
those are already rejected.

It may also be a good idea to zero-out the srgb flag for formats that
it doesn't apply to.
2020-08-18 20:20:48 -06:00
bjorn d937be35b5 Fix lovr.graphics.line(nil); 2020-08-17 14:43:46 -06:00
Bjorn 53708ae3e3
Merge pull request #282 from alloverse/fix-pico
Fix pico: build error, and controller location
2020-08-17 12:32:43 -06:00
Nevyn Bengtsson 101cd38a7e pico: fix controller position 2020-08-17 14:34:40 +02:00
Nevyn Bengtsson d5e26a72d1 pico: stub for text event 2020-08-17 14:28:56 +02:00
bjorn ce4364fed2 Fix openvr_getSkeleton signature; 2020-08-17 03:30:20 -06:00
bjorn 82159a9885 rm persistent mapping; sync Mesh and ShaderBlock; 2020-08-17 03:29:30 -06:00
bjorn 810086e1ba Make WindowFlags const in createWindow; 2020-08-17 00:55:12 -06:00
bjorn e9841dd562 openvr hand -> device; 2020-08-16 20:28:21 -06:00
bjorn 9d1a685eb7 OpenVR: Remove skeletal input;
To fix the build, it will be re-added soon.
2020-08-16 20:27:24 -06:00
bjorn 4848d9a43a Model:hasJoints; 2020-08-16 00:49:16 -06:00
bjorn 65470f1e0e Update webxr driver; rm webvr; 2020-08-16 00:31:20 -06:00
bjorn 1b5e7b2203 vrapi_getSkeleton; 2020-08-12 15:47:10 -06:00
bjorn 438f7ef0d6 Add more Android keycodes; 2020-08-10 20:52:30 -06:00
bjorn 544c7a72e6 Add missing headers to os_web; 2020-08-08 19:19:56 -06:00
bjorn 4177202cc7 Don't enable GL debug output in WebGL; 2020-08-08 17:38:12 -06:00
bjorn 2a8c454de1 Add some more keys; 2020-08-08 16:04:20 -06:00
bjorn 40594317c3 Android textinput event; 2020-08-08 12:36:09 -06:00
bjorn 6823942e3d utf8_encode function; 2020-08-08 12:13:37 -06:00
bjorn 079338c0cc textinput event utf8 encode; 2020-08-07 16:25:56 -06:00
bjorn c24317d982 Start textinput event; 2020-08-07 15:17:19 -06:00
bjorn 682633d98b Add scancode and key repeat arguments to key events; 2020-08-07 14:15:45 -06:00
bjorn 414c5b991d Event module cleans up pending events on quit; 2020-08-06 20:09:45 -06:00
bjorn 1e30c0d93c Android key events; 2020-08-06 19:42:12 -06:00
bjorn cb4281b889 Add keypressed and keyreleased events; rm t.hotkeys; 2020-08-06 19:19:45 -06:00
bjorn c20c5508b4 vrapi: lovr.headset.newModel and lovr.headset.animate; 2020-08-06 18:00:54 -06:00
bjorn 634dcc2119 Update README;
I hate line breaks.
2020-08-05 15:11:29 -06:00
bjorn 3e9c877507 Add missing malloc assert; 2020-08-05 15:08:35 -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 eb97230c0d
Merge pull request #281 from alloverse/fix-pixeldensity
fix crash in lovrGraphicsGetPixelDensity
2020-08-05 11:11:27 -06:00
Nevyn Bengtsson b938a839e0 fix crash in lovrGraphicsGetPixelDensity
Neither Quest nor Pico check for null on its out-params.
Better to send in dummy params to avoid nulls.
2020-08-05 14:48:58 +02:00
bjorn e0decf5327 Fix ModelData pointer alignment;
ModelData manages a single allocation and creates pointers into
that allocation.  These pointers were tightly packed, creating
alignment issues which triggered undefined behavior.  Now, the
pointers are all aligned to 8 byte boundaries.
2020-08-04 12:28:21 -06:00
bjorn 83ff4783c2 ALIGN macro aligns up instead of down;
So you don't have to add (n - 1).  Hopefully this turns out to be
the common case.
2020-08-04 12:23:45 -06:00
bjorn 86fee211f1 Default errhand implementation handles restart event; 2020-08-04 12:21:38 -06:00