Commit Graph

2563 Commits

Author SHA1 Message Date
bjorn eb83962fc6 OpenXR fixes; 2019-10-02 16:29:09 -07:00
bjorn 17dda66b69 boot.lua works without headset module; 2019-10-02 16:20:50 -07:00
bjorn cc858e062c Don't mind me; 2019-09-26 21:58:26 -07:00
Bjorn c210d4e11d
Merge pull request #152 from bjornbytes/mac-bundle
Load .lovr files from the macOS app bundle;
2019-09-26 20:21:50 -07:00
bjorn 2e44926767 Cleanup; 2019-09-26 20:19:50 -07:00
bjorn f4c6e9bd12 oculus_mobile: set error callback based on current coroutine;
Currently:

- load/update/run/etc. take place on the boot.lua coroutine.
- draw happens "asynchronously" on the main thread.

When C needs to throw an error, it doesn't know which thread to
throw the error on.  If it throws it on the wrong thread, you get
a crash instead of an error screen.

One way to fix this is to change the error context based on the
thread that's currently running, so that errors in C are thrown
on the correct thread.  This is the approach that's taken here.

A potentially better approach would be to run all the code on the
same thread, but I ran into issues when I tried to do this.

It may also be possible to (ab)use the Lua panic handler to catch
errors on one of the threads and somehow forward them to the other.
2019-09-26 18:46:19 -07:00
Bjorn d23f2f5810
Merge pull request #151 from sophiabaldonado/oculus-mobile-fix-error-screen
Throw lua errors in the error handler
2019-09-26 18:44:05 -07:00
Bjorn 9d75c0472d
Merge pull request #153 from mcclure/oculus-mobile-vibrate
Vibrate function for Oculus Quest
2019-09-26 16:51:07 -07:00
mcc dc92eb5c58 Oculus mobile vibrate() returns false on illicit second call; style changes 2019-09-26 19:32:12 -04:00
mcc 4a41f98562 Vibrate function for Oculus Quest, first pass
Only does "simple" vibrate (hard on/off). Supports duration but not frequency. Requires a corresponding commit in the lovr-oculus-mobile repo.
2019-09-26 18:40:04 -04:00
bjorn 0129a80b27 Load .lovr files from the macOS app bundle; 2019-09-24 21:37:44 -07:00
sophia ef84a16716 Throw lua errors in the error handler; 2019-09-24 12:04:36 -07:00
bjorn 403b217781 Fix Model destructor memory issues;
- Memory leaks.
- Freeing things that weren't allocated.
2019-09-20 13:46:27 -07:00
bjorn 2c29119e44 Fix non-interpolated cubic spline keyframe evaluation; 2019-09-19 23:01:50 -07:00
bjorn 22beccedc3 Model:getAnimationDuration; 2019-09-19 19:21:31 -07:00
bjorn 1902787b1b Modify GPU timer API;
- lovr.graphics.tock returns the latest value of the timer, or 0.
- Timers are not in the stats table anymore.

This is to prepare for an upcoming internal change that affects timers.
2019-09-18 18:21:38 -07:00
bjorn e96c541244 Multithreaded builds on Windows; Formatting; 2019-09-18 16:12:08 -07:00
bjorn f82bcb703b Finalize skeletal input API; 2019-09-18 16:12:08 -07:00
bjorn 6c130ebd86 Fix warning; 2019-09-18 16:12:08 -07:00
bjorn b3f1b1db0c mat4:rotate uses y axis by default; 2019-09-13 23:22:29 -07:00
Bjorn e4d54f8aa6
Merge pull request #148 from mcclure/signed-lovrViewID
Make lovrViewID signed on Oculus Mobile (fix "mask" example)
2019-09-12 00:01:28 -07:00
Bjorn c4b90c04cf
Merge pull request #149 from mcclure/info-print
Oculus mobile: Promote Lua print() statements to INFO
2019-09-12 00:00:29 -07:00
mcc 785c7c722b Oculus mobile: Promote Lua print() statements to INFO
This means Lua print() statements can be uniquely filtered out vs anything else (because internal Lovr logging uses loglevel DEBUG and lovr errors use loglevel WARN).
2019-09-11 19:43:44 -04:00
mcc 38f4204661 Make lovrViewID signed on Oculus Mobile
The "mask" example was failing on Oculus Mobile on the line of glsl:
if (lovrViewID == 1) {
because lovrViewID was unsigned and 1 was signed. One way to fix this would be to replace 1 with 1u as that is unsigned, but this would be the wrong fix because lovrViewID is in fact signed on all platforms other than Oculus Mobile. lovrViewID was depending on platform defined to either gl_ViewportIndex (signed), a signed uniform, or gl_ViewID_OVR (unsigned). The solution is to place an explicit cast in the multiview definition of lovrViewID so that it is signed on all platforms.
2019-09-11 18:22:06 -04:00
Bjorn cc3a3ed302
Merge pull request #146 from mcclure/getMaterialName
model:getMaterialName(idx)
2019-09-04 18:33:24 -07:00
mcc c9cc5362bd model:getAnimationName(idx) and model:getNodeName(idx) 2019-09-04 21:09:54 -04:00
mcc 8b18c735ca model:getMaterialName(idx) 2019-09-04 17:17:56 -04:00
bjorn 5ed132635a Fix error screen when headset module is disabled; 2019-09-03 15:34:41 -07:00
bjorn 3e47f958ad Fix mat4:lookAt; 2019-08-31 05:45:19 -07:00
bjorn 39376a10d5 normalTexture -> normalMap; 2019-08-31 05:31:20 -07:00
bjorn 79b5d2962c Fix problem with vector lightuserdata handles; 2019-08-31 03:08:42 -07:00
bjorn 9ea785d210 Fix normal matrix;
Now that lighting is in world space.
2019-08-31 03:00:54 -07:00
bjorn 17ae64baec Fix sphere winding; 2019-08-31 03:00:40 -07:00
bjorn 00412e2e79 Add a conf.lua flag for making the window resizable; 2019-08-28 00:59:03 -07:00
bjorn 50a1629dbc Model:get[Animation|Material|Node]Count; 2019-08-27 15:02:24 -07:00
bjorn 31fed6a940 Fix stereo flag for custom shaders; 2019-08-27 14:59:17 -07:00
bjorn f97031a8ec Fix Android print with multiple arguments; 2019-08-26 16:19:58 -07:00
bjorn 305596adf8 Fix windows build;
LOVR_EXPORT needs to be on the declaration, unfortunately.
2019-08-26 15:53:10 -07:00
bjorn 5fb3d55f37 Increase specificity of 'test' gitignore; 2019-08-26 15:46:38 -07:00
bjorn f64e2064ef Adjust Canvas padding so it's 128 bytes; 2019-08-23 01:43:35 -07:00
bjorn 80eaea21f1 Adjust Buffer padding so it's 48 bytes; 2019-08-23 01:35:46 -07:00
bjorn 8d8f4eef73 Adjust Texture padding so it's 64 bytes; 2019-08-23 01:34:23 -07:00
bjorn a073206c20 Standard shader: Fix some precision issues in GLES; 2019-08-22 21:57:59 -07:00
bjorn e9654cd067 Fix function prototypes; 2019-08-21 23:19:42 -07:00
bjorn 28344928c9 Simplify arr; 2019-08-21 23:16:58 -07:00
bjorn ba1e97e626 Add test folder; 2019-08-21 22:27:52 -07:00
bjorn 9b0e43b249 Fix t.window = nil; 2019-08-21 22:26:31 -07:00
bjorn 13655d0df4 Simplify logging; 2019-08-21 19:02:02 -07:00
bjorn fb2d8aae2c Fix CMakeLists; 2019-08-21 16:33:13 -07:00
bjorn cd09e1e695 rm sds; 2019-08-21 16:30:20 -07:00