Rendering should move to the SDL GPU renderer, for lighting and particles #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.txt (at
bbb7b8f)The 2D backend draws through
SDL_Renderer. Lighting and particles want the GPUrenderer instead.
The vtable is already the seam this goes behind.
akgl_RenderBackendis arecord of six function pointers, and
akgl_render_2d_bindinstalls oneimplementation of them; a GPU backend is another
akgl_render_gpu_bindbeside it,not a rewrite of the callers. That was the point of splitting
bindout ofinit.Research collected while this sat in
TODO.txt, kept because it is the part thattook the time:
https://github.com/TheSpydog/SDL_gpu_examples/blob/main/Examples/Blit2DArray.c
https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Introduction,
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/bb153302(v=vs.85),
http://www.directxtutorial.com/LessonList.aspx?listid=112
no docs on this tool.
everyone is unifying on SPIR-V, but SPIR-V is an intermediate representation and
HLSL is higher level, so HLSL is easier to pick up and points at a language with
a stated end date.
https://www.youtube.com/playlist?list=PL78XDi0TS4lEMvytsE_MoWEpzBcukXv9b
Sequencing note: several perf items measure the software renderer today. A GPU
backend changes what "the blit" costs and therefore what the bookkeeping targets
in
PERFORMANCE.mdare being compared against -- worth re-recording the baselinerather than reasoning across the two.
Files:
src/renderer.c,include/akgl/renderer.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)