Commit Graph

3850 Commits

Author SHA1 Message Date
bjorn 88000579ff Don't call start on tracking drivers;
Start is mainly used for setting up graphics-related stuff, since it
was created to perform setup after the window/graphics module is
initialized.  Since the display driver is the only one doing rendering,
it makes sense to only call start on the display driver.

...also fixes a bug where start is getting called twice.
2021-06-16 16:15:08 -06:00
bjorn 0582746137 Fix OpenXR compilation; 2021-06-12 14:42:30 -06:00
bjorn 82b7632cea Require material textures to be 2D; 2021-06-12 14:26:39 -06:00
bjorn 69a22afed4 Fix vrapi compilation; 2021-06-12 14:15:00 -06: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
brainrom 3d1775e468 Lua links properly
mlib required to build Lua, dl lib used to load compiled plugins from shared libraries.
2021-06-10 10:37:30 -06:00
bjorn 7dc54cc264 Add lovrCheck macro;
lovrCheck is a new way of performing runtime assertions.

It's identical to lovrAssert, except it's compiled out if
LOVR_UNCHECKED is defined.

It is meant to be used for non-mission-critical validation, for
example proper usage of types passed to the Lua API.  lovrAssert
should still be used to check return values from platform APIs.
2021-06-05 11:12:00 -06:00
bjorn 053c318995 Fix depth test;
- Use incoming depth settings to determine whether depth test should be
  enabled or disabled (wtf)
- Always track state.depthTest, even if depth test is disabled
2021-06-01 12:58:02 -06:00
bjorn cc367c6a3a tup: update vrapi path; 2021-06-01 10:00:59 -06:00
bjorn bf627e1e3e Allow passing vec2 as scale argument;
Useful for planes.
2021-06-01 09:59:38 -06:00
bjorn a9e22a37c2 rm unused variables; 2021-06-01 09:59:38 -06:00
bjorn 907305e430 Fix oculus hand model orientation;
- Previously, animate was converting from oculus basis to lovr basis.
- Not all hand models are animated.
- Instead, apply the compensation in newModel.
- This means that both animated and non-animated models have correct orientation.
- Verified that regular getPose is returning correct rotation as well.
2021-06-01 09:59:38 -06:00
Ilya Chelyadin ce3470a6e6 All-in-One Lua loader 2021-06-01 09:59:38 -06:00
bjorn a45fab4416 vrapi: map pinch to trigger axis; 2021-06-01 09:59:38 -06:00
bjorn ca4b7d01bc Allow passing vec2 as scale argument;
Useful for planes.
2021-05-31 15:05:13 -06:00
bjorn 46a5c83a08 rm unused variables; 2021-05-31 15:04:24 -06:00
bjorn 89550e55d6 Fix oculus hand model orientation;
- Previously, animate was converting from oculus basis to lovr basis.
- Not all hand models are animated.
- Instead, apply the compensation in newModel.
- This means that both animated and non-animated models have correct orientation.
- Verified that regular getPose is returning correct rotation as well.
2021-05-31 14:35:53 -06:00
Nevyn Bengtsson 055a15eeb3 Remove Git LFS from Oculus Mobile 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson ff4f594a62 switch back from aaudio to opensl
because capture on quest is broken with miniaudio's aaudio backend :/
2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 28abb7270d Omit main() function if requested 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 4a3d979925 remove redundant link_directories 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 88de9a41af LOVR_BUILD_WITH_EXPORTED_INTERNALS --> LOVR_SYMBOL_VISIBILITY 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 7b70fac0bb mic permissions code for macos 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 9c37a6cdc8 don't include main/winmain in dll build
otherwise the parent app can't define a main of its own
2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 62a2d01daf API for Sound:getCapcity 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 6566423f66 Sound:setFrames should use a stream's write buffer size, not read buffer size
otherwise you can never fill up a stream from scratch
2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 9f45e7a9c5 I think audio:setDevice requires this permission 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 9f697de402 allow plugins from parent project
So that projects that use lovr as a submodule can
inject their own plugins.

By picking them up from the _root_ project, whatever project that
is embedding lovr can decide for itself what plugins to use. This
is cleaner than using a separate glob and a variable in the case
where lovr will never come bundled with a standard set of plugins.
2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 361c6a1356 Allow brave/foolish souls to use internal private C API 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson ac3d873311 use generator expression for --ks-pass 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 5ab7bebf45 Android: Allow having a key pass (not just a keystore pass) 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 91a2ba0bac bump oculus-mobile to 25.0 and rewritten history 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 1756983eb3 Embed submo's to VR SDKs 2021-05-31 09:07:38 -06:00
Ilya Chelyadin b6c3a8fa17 All-in-One Lua loader 2021-04-30 18:50:35 -06:00
bjorn 25bb12d07c Native textures don't destroy their handles;
If a Texture is created from a handle, that means someone else created
it, so we expect them to destroy it.  We were always destroying handles,
and I guess this was usually okay because glDeleteTextures is idempotent.

However, we're seeing a crash in the Oculus driver when OVR is torn
down.  Presumably it is trying to access its swapchain textures after we
destroyed them.  Not sure why this wasn't an observable issue before,
maybe it's a new regression.  Still, it makes sense to only delete the
GL texture handle if we were the one that created it.

We don't need to check this for the renderbuffer since we always own those.
2021-04-27 22:24:42 -06:00
bjorn 51f81c9db6 Switch back to ALSA on Linux; 2021-04-27 22:20:56 -06:00
bjorn 87bf9c7b27 Merge branch 'master' into dev 2021-04-27 22:20:38 -06:00
bjorn 4a4aff210d Upgrade miniaudio; 2021-04-27 22:17:07 -06:00
bjorn 0a9956db60 phonon: Fix crash when setGeometry fails;
The call to `free` above was fixed, but the one in the error case
was not.
2021-04-27 22:15:15 -06:00
mcc 0209e75137 Pass -DLOVR_SANITIZE to CMake config for AddressSanitizer+ubsan 2021-04-27 21:30:31 -06:00
mcc 2a30a7f38d Get SteamAudio and OculusAudio working on mac. Also add the Phonon target as a dependency when LOVR_USE_STEAM_AUDIO (all platforms), which has no effect but could be useful later if SteamAudio acquires any build steps while still being a runtime-linked library. 2021-04-27 00:02:44 -06:00
bjorn 09c1fe8117 Improve luax_readmesh error handling; 2021-04-23 12:55:21 -06:00
bjorn 159243190b rm some unnecessary includes; 2021-04-20 20:08:30 -06:00
mcc fc87bffbe0 Fix Android CMake build. 2021-04-20 07:45:39 -06:00
Jakob Bornecrantz 28a0356a9a Add overlay support for OpenXR 2021-04-16 14:20:05 -06:00
Jakob Bornecrantz 70ef04e595 Add overlay parameter to headset init 2021-04-16 14:20:05 -06:00
Jakob Bornecrantz 909b43f34a Order OpenXR extension adding 2021-04-16 14:20:05 -06:00
bjorn e4d06211d3 Update README; 2021-04-16 11:20:36 -06:00
Josip Miskovic 8b5d3af9b8 Allow using alpha with hexcode when setting color
Implements #411 proposal
2021-04-15 10:24:35 -06:00
bjorn 7f629323f8 Fix tup msdfgen path; 2021-04-14 19:34:01 -06:00