Commit Graph

1477 Commits

Author SHA1 Message Date
bjorn 7ca331a5f5 Adjust fs_read/fs_write signatures; Fix seeking; 2023-11-22 16:37:31 -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 79abe3b1d6 Windows fixes; 2023-11-21 20:19:49 -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 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 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 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 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
bjorn 8ed5572b0e rm lovr.graphics.initialize/isInitialized;
This only existed because the graphics module had to know about the
window during initialization, but this is no longer the case.
2023-11-03 15:53:33 -07:00
bjorn c98db5b670 lovr.system.wasMousePressed/Released; 2023-11-02 18:55:02 -07:00
bjorn 038db88cb7 Consolidate texture format features;
- 'sample' now implies both sample and linear filtering (practically always
  true for all formats lovr supports)
- 'render' now includes 'blend' for color formats (also practically
  always true except for r32f on some old mobile GPUs)
- 'blit' now includes 'blitsrc'/'blitdst' because lovr doesn't support
  blitting between textures with different formats
- 'atomic' is removed because lovr doesn't really support atomic images yet
2023-11-02 15:33:29 -07:00
bjorn c2d9aa5657 Destroy linear texture views; 2023-11-02 13:40:16 -07:00
bjorn 90a14478a3 lovrImageCreateRaw takes sRGB flag; Fix readback encoding;
Roundtripping pixels through a readback preserves sRGB encoding.
2023-11-02 13:38:21 -07:00
bjorn b2083e9a4a Ignore linear=false flag for linear-only formats;
Also fix bug with r8 srgb canvases...
2023-11-02 13:26:49 -07:00
bjorn 0468a2f090 Default texture is linear; 2023-11-02 13:16:00 -07:00
bjorn e9743a2fb8 Secretly create and bind linear views of sRGB storage textures; 2023-10-31 17:14:09 -07:00
bjorn a28d66e3a1 Mesh:setMaterial takes texture too; 2023-10-31 16:08:00 -07:00
bjorn 9ff8ad61e1 Prefix KEY enums with OS_KEY; 2023-10-31 13:16:20 -07:00
bjorn df9f50ca5c Fixes for layer depth test and depth submission; 2023-10-26 16:29:35 -07:00
bjorn bdbdd467e0 Layer improvements; 2023-10-25 15:24:14 -07:00
bjorn 6bccbd66ec Layer fixes; 2023-10-25 15:24:14 -07:00
bjorn c8eb6606c6 OpenXR layer implementation; 2023-10-25 15:24:13 -07:00
bjorn 4c2e206e30 Bindings; 2023-10-25 15:23:41 -07:00
bjorn 72aac1c58a Start Layers; 2023-10-25 15:23:41 -07:00
bjorn 2f8d9aa6dc Disable depth submission when depthResolve is not supported;
Prefer MSAA over depth submission on GPUs that can't resolve depth
buffers (Quest 1).
2023-10-25 15:22:16 -07:00
bjorn 42cfb273f9 Fix bug where depth wasn't being submitted to VR runtime; 2023-10-25 15:15:16 -07:00
bjorn 0dfa95626e Model:resetBlendShapes;
Resets blend shapes to default values, like :resetNodeTransforms.
2023-10-18 15:51:52 -07:00
bjorn 35628e332c rm deprecated pass stuff; 2023-10-15 14:10:39 -07:00
bjorn ab3922345f rm deprecated buffer stuff; 2023-10-15 14:08:50 -07:00
bjorn 99f8c3a25c Fix frustum culling;
The technique used only works for AABBs.  Trying to apply the model
matrix to the extent like that isn't valid.  For now, switch back to
the naive approach.  This is quite a bit slower, but at least it's
correct.
2023-10-11 18:21:11 -07:00
bjorn 68aad50a2d Use better UBO size when pass has more than 256 draws; 2023-10-11 13:55:25 -07:00
bjorn 5d6f538524 Pass:barrier also barriers against indirect stage;
Fixes a validation error that probably no one was running into.
2023-10-11 08:26:06 -07:00
bjorn b319aeeb40 Fix Pass:send when using a table with an array UBO; 2023-10-07 16:22:56 -07:00
bjorn 539b19c84c Fix minor undefined behavior; 2023-10-05 12:21:27 -07:00
bjorn 6cfbfd050d Fix issue with synchronization;
If there is only a single pass in the submit, barrierCount is zero
since there will be no inter-pass synchronization.  This is almost
correct, but not quite, because if a Pass has compute and render work,
the render pass may need to synchronize with the compute pass.  So a
barrier is still necessary.  For simplicity, always allocate the full
number of barriers, even though the final render barrier will always be
empty.

Additionally, avoids passing NULL to memset when the barrier count is
zero and the barrier arrays are NULL.
2023-10-05 12:09:55 -07:00
bjorn fc9bb8a5e4 Fix crash when trying to load hand models on non-Quest; 2023-10-04 17:04:03 -07:00
bjorn 6682fe1930 Fix Mesh:computeBoundingBox; 2023-10-04 14:36:39 -07:00
bjorn 44b250a517 Fix issue with texture readback layer count; 2023-10-04 13:12:55 -07:00