Qwerasd
7ca9cd1994
docs: document uniforms available to custom shaders
2025-06-22 17:07:26 -06:00
Qwerasd
d0ff2452d5
renderer: add cursor color to custom shader uniforms
2025-06-22 11:05:16 -06:00
Qwerasd
bb576d1340
renderer: add custom shader cursor uniforms
...
Based on / supersedes PR #6912 , implements discussion #6901
Co-authored-by: Krone Corylus <ahustinkrone@gmail.com >
2025-06-22 11:05:16 -06:00
Qwerasd
c7a7474be0
renderer: move custom shader uniforms out of frame state
...
These should not be independent per-frame, that makes the time
calculations all sorts of jank.
Also moves the uniforms struct layout in to `shadertoy.zig` and cleans
up the handling in general somewhat.
2025-06-21 23:07:18 -06:00
Qwerasd
ddf1a5b23d
renderer: move drawFrame AutoreleasePool handling to GraphicsAPI
...
Introduces `drawFrameStart`/`drawFrameEnd` for this purpose.
2025-06-20 16:21:44 -06:00
Qwerasd
ab926fc842
naming(GraphicsAPI): repeat -> presentLastTarget
2025-06-20 15:51:48 -06:00
Qwerasd
a802108558
renderer: remove unused surface parameter from updateFrame
2025-06-20 15:49:53 -06:00
Qwerasd
8b9e6641f2
style(renderer): explicit result type
...
In case of future breaking changes to `options`
2025-06-20 15:48:44 -06:00
Qwerasd
9d00018f8b
renderer: minimize initial size of GPU resources
...
These will all be resized anyway on the first frame, so there's no point
in preallocating sizes that will be too small.
2025-06-20 15:18:41 -06:00
Qwerasd
2f10caec8f
renderer: clarify why SwapChain.defunct is required
2025-06-20 15:18:41 -06:00
Qwerasd
6b7d751007
renderer: make GraphicsAPI.swap_chain_count required
2025-06-20 15:18:41 -06:00
Qwerasd
dccbec2283
style(renderer): capture generic consts as decls in returned struct
...
Out of an abundance of caution, since there have been issues in the past
relating to consts outside of the returned struct.
2025-06-20 15:18:41 -06:00
Qwerasd
ac2eef9aeb
renderer: disable multi-buffering for OpenGL
...
Frames are sequential for OpenGL since the completion handler always
calls `glFinish`, so the extra buffers do nothing but waste memory.
2025-06-20 15:18:41 -06:00
Qwerasd
371d62a82c
renderer: big rework, graphics API abstraction layers, unified logic
...
This commit is very large, representing about a month of work with many
interdependent changes that don't separate cleanly in to atomic commits.
The main change here is unifying the renderer logic to a single generic
renderer, implemented on top of an abstraction layer over OpenGL/Metal.
I'll write a more complete summary of the changes in the description of
the PR.
2025-06-20 15:18:41 -06:00