1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
Commit graph

1672 commits

Author SHA1 Message Date
bjorn 7b72c64de4 Quat:SetEuler -> :setEuler; 2024-01-20 03:43:18 -08:00
bjorn a4c57193d5 Details; 2024-01-20 03:42:51 -08:00
Bjorn 5bbd093cf1
Merge pull request #730 from jmiskovic/fix/sphere_segments
Bound check the number of sphere segments
2024-01-19 17:27:42 -08:00
Bjorn 0f64de7d2c
Merge pull request #722 from xiejiangzhi/quat_euler
Add quat:ToEuler and quat:fromEuler
2024-01-19 17:27:18 -08:00
Josip Miskovic 3db04db05a Bound check the number of sphere segments 2024-01-19 23:18:58 +01:00
xiejiangzhi 165dac6130 Rename toEuler -> getEuler & fromEuler -> setEuler for Quat
Use float instead of double for quat euler calc
2024-01-19 19:04:57 +08:00
bjorn 3cf76c81e7 Refactor shader stages; rm ShaderType;
Goal is to support more combinations of shader stages, both for
vertex-only shaders and mesh/raytracing shaders in the future.  In
general most of the logic that conflated "stage count" with "shader
type" has been changed to look at individual shader stages.
2024-01-05 14:59:19 -08:00
bjorn da763c8786 rm ability to create shaders from tables of spirv opcodes;
I don't think anyone was using this, and it adds ambiguity to
the newShader argument logic.
2023-12-30 19:52:41 -08:00
bjorn 375866d3d4 lovr.system.openConsole; 2023-12-02 18:17:36 -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 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 c0c62e165a File:seek returns success; 2023-11-22 16:24:46 -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 655c0816ba Add quat:ToEuler and quat:fromEuler 2023-11-22 15:54:52 +08:00
bjorn 19ac219b0c Add File object; 2023-11-21 18:49:32 -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 62810a195c rm Pass:append;
This was an experiment that was never documented/announced.
2023-11-09 16:08:14 -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 9e82dc9148 Layer count is implicitly 6 when creating cubemap;
LÖVR understands me
2023-11-06 15:53:01 -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 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 afef8887ba Texture:getFormat also returns linear/srgb encoding; 2023-11-02 13:17:05 -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 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 2c5f9d379b World:raycastAny and World:raycastClosest;
These are methods that implement some common raycast behaviors without
creating a closure.  They also take tag filters.  The tag filters could
be optimized to use tag numbers instead of string comparison, and the
default raycast method could take a tag filter, but I didn't want to
modify the C API while Jolt is in progress.
2023-10-23 16:09:07 -07:00
bjorn 0dfa95626e Model:resetBlendShapes;
Resets blend shapes to default values, like :resetNodeTransforms.
2023-10-18 15:51:52 -07:00
bjorn c9e12680fe rm deprecated headset stuff; 2023-10-15 14:10:39 -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 6e12370ee8 Fix out of bounds access in newShader; 2023-10-05 11:26:43 -07:00
bjorn 2a3b517334 Fix incorrect depth buffer default in Pass:setCanvas;
If you did newPass(texture) instead of using a table, the pass would not
have a depth buffer instead of using d32f.
2023-10-05 07:20:01 -07:00
bjorn e307487041 Pass:send supports single booleans for push constants;
vectors/arrays/structs with booleans still aren't supported.
2023-10-05 06:36:21 -07:00
bjorn c0fbc515f8 Fix Mesh:getIndices; 2023-10-04 14:40:34 -07:00
bjorn 44b250a517 Fix issue with texture readback layer count; 2023-10-04 13:12:55 -07:00
bjorn 327b1954ea Readbacks with nesting always use key-value format; 2023-10-04 09:00:36 -07:00