Commit Graph

3051 Commits

Author SHA1 Message Date
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
bjorn f1b447662d Fix lovr.headset.getDriver when passed a Device; 2020-08-04 12:19:22 -06:00
Bjorn 5116ae75f2
Merge pull request #280 from alloverse/fix-pico
Fix Pico build
2020-08-04 10:44:47 -06:00
Nevyn Bengtsson 4dcca11a78 fix case problem in VrApi include path
in the sdk, 'Include' folder is capital I. With lowercase in
cmake, build fails on case sensitive file systems.
2020-08-04 14:59:23 +02:00
Nevyn Bengtsson 27384ac62c Fix Pico build
* lovrPlatformGetBundlePath was missing the root argument
* ANDROID_SDK can't be assumed to be the parent of the ndk folder, in case it's a side-by-side installation of the NDK. Instead, ANDROID_SDK should be provided with -D
* One more thing we could mention in the docs that I ran into: Installing java with apt gave me an incompatible version. It worked better to just -DJAVA_HOME= to the java that comes with Android studio (/snap/android-studio/91/android-studio/jre on ubuntu).
2020-08-04 10:42:04 +02:00
bjorn ee95e6c6bd Refactor OBJ model loading;
It no longer uses sscanf and no longer overflows its buffer.
2020-08-04 00:12:58 -06:00
bjorn b45baacb66 Handle active attributes that don't have a location;
There are some attributes that don't have a location (gl_InstanceID
is being reported for some reason).  Their location is -1 and this
causes a left shift of a negative value which is undefined.
2020-07-30 02:46:17 -06:00
bjorn 4160743b77 Fix desktop game packaging issue;
Accidentally hardcoded it to "assets" when updating Android.
2020-07-29 16:30:14 -06:00
bjorn 826fc098bc Set identity to empty string if save mount fails; 2020-07-29 16:27:17 -06:00
Bjorn 617d508d68
Merge pull request #269 from jmiskovic/savemount
Config parameter for save directory precedence
2020-07-29 16:26:07 -06:00
bjorn ae2e14f98f rm save directory mount failure fix;
This is a temporary revert to make a merge easier.
2020-07-29 16:25:29 -06:00
bjorn 99fdcc8287 Fix calling convention of GL debug callback; 2020-07-29 14:56:46 -06:00
bjorn d4f88f3d8d lovr.log: strip trailing newline in default implementation;
GL debug messages sometimes have newlines...
2020-07-29 14:24:57 -06:00
bjorn f0a5a8838b OpenGL debug messages and contexts;
The new t.graphics.debug flag controls the following:

- If enabled, a debug context is created
- If disabled, a no-error context is created
- If enabled, GL debug messages are forwarded to lovr.log
2020-07-28 16:12:30 -06:00
bjorn e3aa4c7d5d t.graphics.debug flag; 2020-07-28 16:12:15 -06:00
bjorn 5a17b48e4e Add GL_KHR_debug; 2020-07-28 16:08:37 -06:00
bjorn b024e71a98 Fix luax_vlog stack balancing; 2020-07-28 15:31:02 -06:00
bjorn c423b1292a Fix save directory to use system path separator; 2020-07-27 18:15:16 -06:00
bjorn 91fb120dcc tup: pico rules; 2020-07-27 17:20:58 -06:00
bjorn 55f66f217e Adjust pico SDK version to 27; 2020-07-27 17:09:16 -06:00
bjorn ac58a1aeba Pico: Draw the rest of the owl;
Add entrypoints, headset backend code, fill in the Activity, and
add various special cases to account for the asynchronous render loop,
lack of sRGB support, and OpenGL state resets.
2020-07-27 14:56:21 -06:00
bjorn 58ab637465 Custom os implementation for pico; 2020-07-27 14:28:40 -06:00