Commit Graph

130 Commits

Author SHA1 Message Date
bjorn d1dc2f3199 rm pico;
Notes:

- We can actually use a single Activity.java file for oculus/pico now
- We can unconditionally compile os_android.c on Android
- No need for including extra jars in build system
- Headset rendering is guaranteed synchronous now, no need to ref L
- Add an "android flavor" build setting to differentiate between oculus
  and pico devices, since they both use OpenXR.
- Update the pico manifest to reflect their OpenXR sample
- Remove some OpenGL hacks that aren't necessary anymore
2022-03-22 16:03:21 -07:00
bjorn f1cc668298 rm vrapi; 2022-03-22 16:02:45 -07:00
bjorn 4f39f4f68f rm oculus; 2022-03-22 16:02:45 -07:00
bjorn b9889ca97a rm openvr; 2022-03-22 16:02:45 -07:00
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 fa47ecbdd3 v0.15.0; 2021-04-11 08:57:11 -06:00
bjorn f9f4907a50 phonon fixes; 2021-03-07 22:42:54 -07:00
bjorn 4f5adbc64c lovr.system; 2021-02-25 09:00:12 -07:00
bjorn f1922e22c8 Sharpen nogame screen; 2021-02-22 17:53:47 -07:00
bjorn 72284c2c5b Merge branch 'master' into dev 2021-02-12 08:16:36 -07:00
bjorn 50ee404b91 Default lovr.run no longer requires timer and event modules; 2021-02-09 08:27:11 -07:00
bjorn 39c0fa6e99 Don't set audio listener pose automatically;
It isn't always correct once you add locomotion to a project, and
it actually becomes harmful because the pose ping-pongs between
the default pose and the user pose, causing distortion.
2021-02-09 07:52:12 -07:00
bjorn e3e7b265a3 Add the ability to opt-out of default output device initialization; 2021-02-08 16:08:29 -07:00
bjorn 93ea56155e scribbling; 2021-02-08 16:08:29 -07:00
Nevyn Bengtsson 8678414628 audio_capture -> audiocapture
to follow ENTRY naming standard
2021-02-08 16:08:29 -07:00
Nevyn Bengtsson cdbefafc1a review: style fixes 2021-02-08 16:08:29 -07:00
Nevyn Bengtsson 0265babef4 Android: Ask for permissions on demand
By looking for failed start and requesting then;
and then emitting a new event type when
permission has been granted or rejected;
and then using that event in the default
boot.lua to re-start capture.
2021-02-08 16:08:29 -07:00
Nevyn Bengtsson 8403c9bd70 just a super dummy spatializer 2021-02-08 16:08:29 -07:00
bjorn c92b47e3a6 Another miniaudio attempt WIP; 2021-02-08 16:08:29 -07:00
bjorn 709a41a352 Do more rendering work when lovr.draw is missing;
- The lovr.headset.renderTo callback can now be nil, causing an empty frame to be submitted to the compositor.
- lovr.mirror will still be called if lovr.draw is nil.  This means the window will be (correctly?) cleared to the background color now if lovr.draw is nil.

This prevents runtimes from thinking the app is missing/unresponsive when lovr.draw is absent.  To get the old behavior, just don't call lovr.headset.renderTo.
2021-02-05 15:03:06 -07:00
bjorn 8ef50b5f6a lovr.mirror: don't call lovr.headset.getMirrorTexture twice; 2020-12-02 14:46:37 -07:00
bjorn 1ff94bc29a Default errhand agnostic to t.math.globals; 2020-11-20 19:23:42 -07:00
Nevyn Bengtsson 220aa70d7c fix crash in error handler when running out of vectors 2020-11-18 21:38:04 +01:00
bjorn 43d5bc78f0 lovr.mirror disables blending when drawing headset texture;
This is so transparent headset textures (when rendering overlays)
don't ghost.  Alternatively, clear could be used.
2020-11-12 18:08:05 -07:00
bjorn 85cc82d8cb v0.14.0; 2020-10-05 16:40:27 -06:00
Nevyn Bengtsson da79a87328 Allow lovr.headset.init to fail
with a pcall, like the requires above. so if there
is no matching headset driver, the module is just
turned off.
2020-10-01 22:43:57 +02:00
bjorn f70201240a nogame fix; 2020-09-29 22:24:40 -06:00
bjorn f7476416ab nogame; 2020-09-25 17:08:51 -07: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 77083d06af Update nogame; 2020-08-30 21:48:47 -06:00
bjorn 7617da0ec1 Move headset initialization to lovr.headset.init;
OpenXR basically has a hard requirement that a graphics API is available
before its session can be created.  Currently the graphics module isn't
always around when headset initialization takes place.  Polling the
graphics availability in update/renderTo has some consequences for calls
made to the headset module in lovr.load or during the first few frames.

So instead we're going to delay headset initialization to a special
function that is called after modules are required.  It can also be
called manually if the window creation is delayed.
2020-08-26 13:42:42 -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 6fd80d10a1 rm unused window argument in errhand; 2020-08-19 14:01:31 -06:00
bjorn 1ca7aeb94e Reset font pixel density in errhand; 2020-08-18 21:15:31 -06:00
bjorn 65470f1e0e Update webxr driver; rm webvr; 2020-08-16 00:31:20 -06:00
bjorn cb4281b889 Add keypressed and keyreleased events; rm t.hotkeys; 2020-08-06 19:19:45 -06:00
bjorn 86fee211f1 Default errhand implementation handles restart event; 2020-08-04 12:21:38 -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 d4f88f3d8d lovr.log: strip trailing newline in default implementation;
GL debug messages sometimes have newlines...
2020-07-29 14:24:57 -06:00
bjorn e3aa4c7d5d t.graphics.debug flag; 2020-07-28 16:12:15 -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 9abed055d8 lovr.log;
lovr.log is a new callback that is invoked whenever LÖVR wants to
send the project a message.  For example, this could be a performance
warning from the graphics module, an error message from one of the
headset backends, or an API deprecation notice.

The callback's signature is (message, level, tag).  The message is a
string containing the message to log, level is a string that is currently
one of "debug", "info", "warn", "error", and tag is an optional string
that is used to indicate the source of the message for grouping purposes.

The default implementation of the callback just prints the message,
but the callback can be overridden to do things like filter messages,
write them to a file, or even render them in VR.  Projects can also
invoke the callback directly to log their own messages.
2020-07-06 16:20:55 -06:00
bjorn a9aaedae61 rm oculusmobile from t.headset.drivers;
Replaced by vrapi
2020-07-02 20:17:09 -06:00
Josip Miskovic 66d7e887c7 Config parameter for save directory precedence 2020-06-21 18:02:36 +03:00
bjorn a1aa3c8ae8 Finish vrapi driver; 2020-06-09 18:02:03 -06:00
bjorn 9ba814fe3f omg; 2020-05-04 17:30:41 -06:00
mcc b5e72d8bd9 Restart cookie minor changes for PR review 2020-04-16 10:57:13 -04:00
mcc fbcce7fc59 Reworked quit/restart events (compatibility break)
Based on Slack conversation, the following changes:
- lovr.event.quit("restart") no longer supported
- lovr.event.quit no longer takes restart "cookie"
- When lovr.event.restart() called, lovr.quit() is not called, instead lovr.restart() is called
- Value returned from lovr.restart(), when called, becomes the cookie
- lovr.event.quit takes the lovr.event.quit() return code as an argument

lovr.run() is unchanged, it still returns (exit code | "restart", cookie).
2020-04-16 00:32:54 -04:00