bjorn
fd2b2e7e4a
Render pass samples can't be a boolean that's weird;
2023-09-30 12:31:10 -07:00
bjorn
fecb0c27d5
Fix nogame screen when headset module is disabled;
2023-09-30 01:46:51 -07:00
bjorn
d7c6461916
Render targets with mipmaps get transfer usage;
...
Also I think no mipmaps is more sane default for render targets.
2023-09-29 05:22:03 -07:00
bjorn
4e6effceff
lovr.graphics.wait updates timing stats and readbacks;
2023-09-28 23:26:04 -07:00
bjorn
4a5a66d2ea
Fix glslang submodule;
2023-09-28 22:10:27 -07:00
bjorn
a2f539de56
Update glslang; Shader #include uses virtual filesystem;
...
This update seemed to increased glslang's binary size even more...
2023-09-28 22:04:05 -07:00
bjorn
7486108462
Add gammaToLinear and linearToGamma shader helpers;
2023-09-28 05:10:26 -07:00
bjorn
684560ef81
Fix Mesh:getDrawRange not returning base vertex;
2023-09-28 03:17:18 -07:00
bjorn
c3b99a397a
Mesh bounding box uses same convention as everyone else;
...
It was using
minx, miny, minz, maxx, maxy, maxz
Instead of
minx, maxx, miny, maxy, minz, maxz
2023-09-28 02:26:53 -07:00
bjorn
19c4aed465
Fix crash when headset module is disabled;
2023-09-27 23:04:55 -07:00
bjorn
c3c5284f11
Improve viewport/scissor accessors;
...
- Better validation
- Can set to nil to "disable"
- Getter returns nil when "disabled"
- Negative viewport height works again
2023-09-27 00:24:01 -07:00
bjorn
3fb3590b77
Mat4:mul/Quat:mul return temp vectors;
...
Quat:mul also takes numbers.
They both require 3 args when using numbers.
I didn't opt for the 4-component Mat4:mul(numbers) variant, mostly out
of laziness.
Co-Authored-By: Josip Miskovic <josipmiskovic@gmail.com>
2023-09-26 01:30:54 -07:00
bjorn
6883c36397
Rename Mat4:getTranslation/Rotation -> position/orientation;
...
It's a little less correct, but literally everything else is
"getPosition" and "getOrientation".
2023-09-25 21:59:51 -07:00
bjorn
fbdecda440
Render textures have mipmaps by default again;
...
They defaulted to 1 to avoid confusion when mipmaps weren't generated
during a render pass (withou the { mipmaps = true } flag), but now the
mipmaps flag is obsolete and render passes automatically generate
mipmaps for all levels in their texture views. This means that render
passes can have mipmaps by default again, which leads to better
appearance when sampling them later.
2023-09-25 00:07:26 -07:00
bjorn
73b1b951f5
Model:clone has separate blend shape state;
2023-09-24 23:51:42 -07:00
bjorn
ed0756bfa2
rm variant of newMesh that takes indices;
...
Too many variants! Also it had bugs.
2023-09-24 23:39:51 -07:00
bjorn
a478f417f2
Pass:draw(Texture) bounds;
2023-09-24 23:31:57 -07:00
bjorn
d021596e6d
Mark blend passthrough mode as supported on Quest;
2023-09-24 22:07:37 -07:00
bjorn
860ebbd133
Fix Shader:getBufferFormat;
2023-09-22 20:44:06 -07:00
bjorn
1d91ea1fde
Replace tinycthread with C11 threads.h polyfill;
2023-09-21 23:26:16 -07:00
Bjorn
5db7d4a914
Merge pull request #704 from bjornbytes/surface
...
Surface Improvements
2023-09-21 22:34:45 -07:00
bjorn
15b6b0d41f
Update LuaJIT;
2023-09-21 22:31:02 -07:00
bjorn
94cdb9ae4e
Fix GCC warning;
...
GCC warns when passing a pointer to a float to lovrModelSetNodeTransform
(currently done in OpenXR driver when updating model poses from an
XrPose).
2023-09-21 22:24:57 -07:00
bjorn
8b5511efc4
Upgrade to OpenXR 1.0.30;
2023-09-21 22:20:27 -07:00
bjorn
f2a9f8ec17
win32: use high resolution timer for sleeps;
2023-09-21 20:49:55 -07:00
bjorn
6eae891eb3
Add Mat4:getPose;
...
Companion to Mat4:getTranslation/Rotation/Scale;
2023-09-21 20:11:26 -07:00
bjorn
2a97fc0380
Vec3:transform; Vec4:transform; Vec3:rotate;
...
Co-Authored-By: Josip Miskovic <josipmiskovic@gmail.com>
2023-09-21 20:03:48 -07:00
bjorn
b03e3244c3
LÖVR no longer requires 64KB uniform buffers;
...
Due to per-draw data size reduction from 144 -> 64 bytes.
2023-09-21 15:58:04 -07:00
bjorn
5a28acf5c4
macos: create metal layer;
2023-09-20 21:17:24 -07:00
bjorn
f66ac0820c
Fix Android probably;
2023-09-20 21:17:24 -07:00
bjorn
4e5d2c811d
Install libX11-xcb-dev on actions;
2023-09-20 21:17:24 -07:00
bjorn
479983fede
gpu: surface improvements;
...
Restores ability to open window after initializing graphics module.
Surface is created lazily instead of being required upfront.
Use native platorm handles instead of GLFW's callbacks.
Some minor reorganization around core/gpu present API and xr transitions.
Linux links against libxcb/libX11/libX11-xcb for XGetXCBConnection.
2023-09-20 21:17:24 -07:00
bjorn
f35d5c9c70
Re-enable objective-c extensions on os_macos;
...
Locally this worked, but maybe CMake was stale.
2023-09-20 17:58:13 -07:00
bjorn
c5793c2410
macos: replace remaining Objective C with C API;
2023-09-20 17:48:01 -07:00
bjorn
f318c68796
Buffers can be cleared to values other than zero;
2023-09-18 23:05:27 -07:00
bjorn
38dbc46e8b
Pass:append also copies draw bounding boxes;
2023-09-18 17:49:19 -07:00
bjorn
ead7a0ccc1
Add backwards compat for lovr.headset.animate;
...
If the first argument is a string, it's ignored and the second is
expected to be a Model. Otherwise, the usual single-argument path is
taken.
2023-09-18 17:31:28 -07:00
bjorn
d7e7449e5a
Fix message box;
...
oops I thought windows was already in graphics.c
2023-09-17 19:04:15 -07:00
bjorn
c98f945cae
rm os_window_message_box;
...
The message box is meant to be a hack to improve UX on Windows, not an
officially supported feature of core/os. So it's more appropriate to
inline it in the one place/platform where it's used.
2023-09-17 17:22:08 -07:00
bjorn
181427eee4
glfw: filter resize events and cache window size;
...
GLFW reports window size as zero on Windows when the desktop window is
minimized. This is by design. Using zero width/height for window
textures isn't valid. The fix is to ignore resize events where the
width or height is zero and also cache the last-valid window size so it
can be reported by os_window_get_size. Sighs...
2023-09-13 18:56:06 -07:00
Bjorn
ec8658f9ef
Merge pull request #702 from jmiskovic/fix/distance-joint-get-anchor
...
Fix getter for distance joint anchors
2023-09-13 15:21:31 -07:00
Josip Miskovic
f16956b07d
Fix getter for distance joint anchors
2023-09-13 22:06:51 +02:00
bjorn
efbcdbfe8e
Fix issue where Material:getProperties was returning uv shift as uv scale;
2023-09-12 01:11:49 -07:00
bjorn
f2343a2056
Fix crash when uvShift/uvScale are tables;
2023-09-12 01:11:49 -07:00
bjorn
f6216415e6
Rename pass memory stats to indicate they're CPU;
2023-09-11 20:19:36 -07:00
bjorn
bfbde95bb2
Fix minor issues with Texture:clear bindings;
2023-09-11 20:11:31 -07:00
bjorn
5b6d882475
Add Image:mapPixel;
2023-09-11 18:48:46 -07:00
bjorn
be213cc32d
Cleanup;
2023-09-11 17:24:27 -07:00
bjorn
9542d46f33
Buffer format cleanup;
2023-09-11 03:01:11 -07:00
bjorn
fe93018627
Fix issue with DrawData UBO size;
2023-09-11 00:35:26 -07:00