Commit Graph

3678 Commits

Author SHA1 Message Date
bjorn cca24fe581 Tweak gitignore;
- Machine-specific excludes do not belong in lovr's gitignore.
  They should be configured using .git/info/exclude or globally.
- Preferential excludes should use .git/info/exclude (e.g.
  plugins, in-tree lua files).
- This restricts gitignore to build-system-generated artifacts.
  Honestly I'd like to remove these too, but need to monitor.
2021-07-19 00:02:10 -07:00
bjorn 0b51bdc5a4 bump ode; 2021-07-18 22:24:00 -07:00
bjorn e4b86bf550 Add _DEFAULT_SOURCE to linux; 2021-07-18 22:24:00 -07:00
bjorn c1b5f421c2 rm .editorconfig;
From experience with PRs, it doesn't seem like it's common for
people to use this to configure their editors.  I would rather
keep the repo root clean.
2021-07-18 22:24:00 -07:00
bjorn 9cc7e9c3f9 Update submodule paths; 2021-07-18 22:24:00 -07:00
bjorn 756448c795 ODE uses no-generated-headers branch; 2021-07-18 22:24:00 -07:00
bjorn 1eaad0ab3b Adjustments for xr path changes and idsig file; 2021-07-18 22:24:00 -07:00
bjorn bb78d266b4 DESKTOP_HEADSET -> DESKTOP; 2021-07-18 22:24:00 -07:00
bjorn a7250cf4ca gc-sections; unwind-tables; 2021-07-18 22:24:00 -07:00
bjorn ecd7769ba0 Convert Tupfile to Lua; 2021-07-18 22:24:00 -07:00
mcc 39dca2f093 Fix lovr.audio.setPose() in oculus spatializer mode 2021-07-18 20:39:46 -07:00
bjorn fdb8a2423c Merge branch 'master' into dev 2021-07-10 09:44:03 -07:00
bjorn e2cad4ed81 Fix crash in Material:setTexture; 2021-07-10 09:42:49 -07:00
bjorn 7984baad65 os_linux: implement virtual memory allocator; 2021-07-09 18:39:23 -07:00
bjorn f959770396 Add missing OpenVR pointer actions; 2021-06-29 13:09:57 -07:00
bjorn 8ef2b064fd Fix ShaderBlock:send(Blob) error message; 2021-06-28 22:39:16 -07:00
bjorn b70f8e2d1a Fix and separate ShaderBlock:send(Blob) offset arguments;
- You were able to write a Blob to a ShaderBlock
- Using ShaderBlock:send(Blob, offset, size)
- It was not flexible enough and it was broken
  - The data was read from `offset` bytes into the Blob.
  - The data was written to the beginning of the Buffer.
  - The Buffer was flushed at `offset` bytes into the Buffer.
- This commit changes the signature of the variant
- to ShaderBlock:send(Blob, srcOffset, dstOffset, size)
- and hopefully fixes the behavior.
- Also why is this entire commit description a bulleted list
2021-06-28 22:32:11 -07:00
bjorn 63320252a1 Fix error when rapidly recreating objects;
If you create and destroy objects quickly (using :release), malloc
might give you the same pointer.  When we look up this pointer in
the userdata cache, it'll give you an invalid Proxy/pointer, which
throws an error like "Calling 'fn' on bad self".

When collecting objects, remove them from the userdata cache.
2021-06-26 14:41:42 -07:00
mcc d7d28eaba0 Fix copy so that plugins can work on mac 2021-06-24 21:04:58 -06:00
bjorn f4ac1ef422 Minor unreachable fix;
Would like to keep unreachable throws consistent.
2021-06-24 14:47:48 -07:00
mcc caf9428ff1 Fix compile on macos 10.13 2021-06-24 15:47:30 -06:00
bjorn 4125796211 Fix shaders with nil stages;
The length was getting kept as zero, need to adjust length when
falling back to default shaders.
2021-06-21 10:22:15 -06:00
Jakob Bornecrantz 93d867a972 Fix AppImage lovr.desktop file
Changes by @darltrash
2021-06-18 15:53:31 -06:00
Jakob Bornecrantz 1842d9e6bb Fix AppImage lovr.desktop file
Changes by @darltrash
2021-06-18 15:53:13 -06:00
bjorn 92a08c326f vrapi: getViewPose returns a pose when position is invalid;
To match getViewAngles.  Also simplify mask check.
2021-06-18 15:51:18 -06:00
brainrom 59d3b25932 Able to get view angles with 3DOF 2021-06-18 15:50:28 -06:00
kokokoshka 7e52ffe956 MinGW support 2021-06-18 15:45:26 -06:00
bjorn 526e06d445 Fix mat4 corruption when using vectors;
We correct m[15] to 1.f too late, by that time the undefined 4th
component of the vec3 could have corrupted the rotation/scale.
2021-06-16 16:55:19 -06:00
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