Commit Graph

4991 Commits

Author SHA1 Message Date
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
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
bjorn 9e82dc9148 Layer count is implicitly 6 when creating cubemap;
LÖVR understands me
2023-11-06 15:53:01 -08:00
bjorn 8d58ad8533 errhand doesn't use lovr.graphics.isInitialized; 2023-11-06 15:52:44 -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 eac68d2fe4 Skip creating texture views for transfer-only textures;
Vulkan forbids it!
2023-11-02 13:50:55 -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 afef8887ba Texture:getFormat also returns linear/srgb encoding; 2023-11-02 13:17:05 -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 55a27d0a69 Implement numpad keys for desktop; 2023-10-31 15:55:00 -07:00
bjorn 9ff8ad61e1 Prefix KEY enums with OS_KEY; 2023-10-31 13:16:20 -07:00
bjorn 1d82e7f66c gpu_texture refactoring; 2023-10-30 18:41:51 -07:00
Bjorn d711df3a7d
Merge pull request #713 from bjornbytes/layers
Layers
2023-10-26 16:57:50 -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