Commit Graph

5211 Commits

Author SHA1 Message Date
bjorn 427ad25120 Fix errhand alignment; 2023-11-27 18:42:49 -08:00
bjorn 3351f473f2 Rework boot process; 2023-11-27 18:42:49 -08:00
bjorn 9d55a5b222 boot.lua sets source instead of filesystem module; 2023-11-27 18:42:49 -08:00
bjorn 64950bc152 lovr.filesystem.setSource; 2023-11-27 18:42:49 -08:00
bjorn 4926362cc7 lovr.filesystem.getBundlePath; 2023-11-27 18:42:49 -08:00
bjorn 1cac651392 Inline LOVR_PATH_SEP; 2023-11-27 18:42:49 -08:00
bjorn a1309cfe87 Minor boot.lua refactors; 2023-11-27 18:42:49 -08:00
bjorn 703e9d3c36 boot.lua stores lovr in local; 2023-11-27 18:42:49 -08:00
bjorn 2e543a96de More zip fixes; 2023-11-27 18:39:27 -08:00
bjorn 399a283536 zip fixes; 2023-11-26 21:49:41 -08:00
bjorn 9445331df8 Create files/directories with more permissions;
Files are created with 664 (though usually modified by umask).

Directories are created with 755 permissions.

Main motivation is to allow adb to access files on Android 12+
2023-11-26 19:10:42 -08:00
bjorn 9da89b7834 Fix Windows build; 2023-11-26 18:15:53 -08:00
Bjorn 07ff7412df
Merge pull request #724 from jmiskovic/fix/vector_pool_allocation
Use virtual memory in vector pools
2023-11-26 14:04:50 -08:00
Josip Miskovic a1d7bf5fbc Use virtual memory in vector pools 2023-11-26 16:54:29 +01:00
bjorn 08d6b2ad28 Refcounted modules;
This allows them to be initialized/destroyed from multiple threads in
any order.  Previously, the first thread to require a module had to be
the last thread to use the module, otherwise it would be destroyed too
early.

There are still a few issues.  If the main thread doesn't require a
module, it won't pick up the conf.lua settings.  Also graphics isn't
handling the shader cache writing properly.  And I think this breaks the
headset-graphics refcounting.  But these will be fixed in future
commits.
2023-11-23 17:07:44 -08:00
xiejiangzhi d2b4ad5a5c Fix euler var name(z forwrad) 2023-11-23 10:43:57 +08:00
Bjorn 3a16e0c290
Merge pull request #721 from bjornbytes/file
File Object
2023-11-22 16:48:20 -08:00
bjorn a42ccaa975 Fix Windows; 2023-11-22 16:42:28 -08:00
bjorn 7ca331a5f5 Adjust fs_read/fs_write signatures; Fix seeking; 2023-11-22 16:37:31 -08:00
bjorn c0c62e165a File:seek returns success; 2023-11-22 16:24:46 -08:00
bjorn 1ef562dcdd fs_open fails if you try to open a directory; 2023-11-22 16:19:45 -08:00
bjorn d949b90eea Details; 2023-11-22 16:19:40 -08:00
bjorn f04a0e6bc4 Fix zip EOF emulation;
To match regular files, the file offset should be allowed to go past the
end of the file, but reads will return 0 bytes.
2023-11-22 15:49:10 -08:00
bjorn 8ac4d7167c File:isEOF; 2023-11-22 15:45:57 -08:00
xiejiangzhi aea3e7cd47 Fix quat_fromEuler 2023-11-22 20:22:10 +08:00
xiejiangzhi e078b10b68 quat<->euler y-up & fix compile warning 2023-11-22 19:08:17 +08:00
xiejiangzhi f328207932 Fix singularity problem for quat_toEuler 2023-11-22 18:04:31 +08:00
xiejiangzhi 655c0816ba Add quat:ToEuler and quat:fromEuler 2023-11-22 15:54:52 +08:00
bjorn 79abe3b1d6 Windows fixes; 2023-11-21 20:19:49 -08:00
bjorn a8d44b27f0 Fix CMakeLists; 2023-11-21 19:07:59 -08:00
bjorn 19ac219b0c Add File object; 2023-11-21 18:49:32 -08:00
bjorn f50e9f6fe1 Use miniz to decompress files; 2023-11-21 18:49:32 -08:00
bjorn d0f1462e51 Make Archive a refcounted object;
- Archive is now an object that has a refcount
- Archives are stored in linked list instead of array
- Not exposed to Lua yet, but could be in the future
- core/zip was merged into the filesystem module
- Mountpoints are handled centrally instead of per-archive
- Zip doesn't pre-hash with the mountpoint anymore
- mtime is truly only computed on request for zips

Mountpoints don't work properly yet.
2023-11-21 18:49:32 -08:00
bjorn 275b63a731 Change offset to seated in default conf;
This was innocuous, but incorrect.
2023-11-21 13:02:01 -08:00
bjorn 209ea1e4b5 Simplify Pass draw list;
It's a normal stretchy buffer instead of a weird page table thing.

This was definitely overdesigned.

Now it uses less memory too.
2023-11-18 02:02:05 -08:00
bjorn e5733bc667 Only generate mipmaps for blittable texture formats;
- If you load an image with a non-blittable format, mipmap count will
  default to 1.
- If you explicitly request mipmaps on a non-blank texture with a
  non-blittable format, that's an error (rather than leaving mipmap
  chain undefined or sliently falling back to 1 mipmap).
2023-11-17 20:48:44 -08:00
Bjorn 895c702388
Merge pull request #720 from xiejiangzhi/auto_wakeup
Auto wake up collider when calling API to apply force or change force.
2023-11-17 17:50:10 -08:00
xiejiangzhi 1e120d3401 Auto wake up collider when calling API to apply force or change force. 2023-11-18 09:43:52 +08:00
bjorn 164e05a150 Update lovr-http; 2023-11-14 06:46:30 -08:00
bjorn e0e1bc68f9 Add support for cubemap arrays;
- Cubemaps can have any layer count that is a multiple of 6.
- A cubemap with more than 6 layers will be a cubemap array image view.
  - This isn't perfect because it conflates regular cubemaps with
    6-layer cubemap arrays.
- Enable the vk feature, handle the spv feature, add getPixel helper.
2023-11-10 11:15:16 -08:00
bjorn 67b1929af6 Merge branch 'stable' into dev 2023-11-09 16:51:28 -08:00
bjorn eefc89909e Fix bitangent sign;
Really gotta compress ModelVertex at some point.
2023-11-09 16:50:52 -08:00
bjorn 62810a195c rm Pass:append;
This was an experiment that was never documented/announced.
2023-11-09 16:08:14 -08:00
bjorn 534947bc20 Merge branch 'stable' into dev 2023-11-09 14:57:42 -08:00
bjorn 4522d1050f Fix OpenXR layout transitions; 2023-11-09 14:57:29 -08:00
bjorn ce4e07db1b Revert removal of lovr.graphics.initialize;
I forgot that graphics also needs to be initialized after headset,
otherwise the XR_KHR_vulkan_enable2 callbacks won't exist yet. Boo
2023-11-09 13:31:56 -08:00
bjorn 02860ff8e9 Merge branch 'stable' into dev 2023-11-09 12:48:10 -08:00
bjorn 648118d308 Fix excessive gamma-to-linear conversion; 2023-11-09 12:47:39 -08:00
bjorn c4cda0a7bb core/gpu: rm TRANSIENT texture usage;
It's implied when the usage is just RENDER
2023-11-08 14:54:10 -08:00
bjorn e8945763c2 core/gpu: allocation callbacks; 2023-11-08 14:45:04 -08:00