Commit Graph
15 Commits
Author SHA1 Message Date
codegirl007 3a8c2ee830 change the way we install sdl 2026-08-01 01:10:37 -07:00
codegirl007 a1fa9863b6 Set up github to run tests 2026-08-01 01:06:05 -07:00
codegirl007 d5ef7f478e Add initial unit tests
- Pulled pure logic out of GPU-facing code so it can be tested without a window: parse_char_def (JSON → Char_Def) and choose_shader_runtime_from_formats (MSL → DXIL → SPIR-V preference)
- Added eight Odin @(test) cases in engine/ covering happy/bad JSON parse, frame-rect hit/miss/OOB, clip-space conversion corners, shader filename mapping, and backend selection
- Added make test to run odin test engine
2026-08-01 01:04:31 -07:00
codegirl007 71d3ce4041 small edit to makefile 2026-08-01 01:03:16 -07:00
codegirl007 fca6bd0945 add unit tests 2026-08-01 00:59:18 -07:00
codegirl007 22cca621f7 Add shader backend + support for multiple shader formats- #2
Adds a runtime GPU shader-backend selection layer so the engine is no longer hardcoded to #load SPIR-V only.

- Introduce Shader_Runtime / choose_shader_runtime (engine/shader_backend.odin)
- Create the GPU device with {.SPIRV, .DXIL, .MSL}, then pick a supported format + shaders/<backend>/ directory
- Load shader blobs from disk and build the sprite pipeline with the chosen format/entrypoint
- Add shader build scripts + Makefile targets (shaders-vulkan / d3d12 / metal / all)
2026-08-01 00:57:32 -07:00
codegirl007 06ade6a4b7 minor clean up to app.odin 2026-08-01 00:46:37 -07:00
codegirl007 fee46730b1 add shader backend + support for multiple shader formats 2026-08-01 00:41:50 -07:00
codegirl007 1a7b777b0f Initial pipeline work
Migrates the toad example from SDL’s 2D Renderer API to SDL_GPU, keeping the same Character_Data / Sprite engine API and baked asset pipeline.

- Replaces CreateWindowAndRenderer / RenderTexture with GPU device + swapchain framing (begin_frame / end_frame)
- Adds sprite vertex/fragment GLSL shaders and compiled SPIR-V (shaders/sprite.*.glsl / .spv)
- Uploads atlas PNGs as GPUTexture via transfer buffer + copy pass (with fence sync)
- Draws sprites as UV quads (DrawGPUPrimitives) using atlas frame rects from char.json
2026-07-31 19:17:47 -07:00
codegirl007 ebb6ea383f Initial pipeline work 2026-07-31 19:11:19 -07:00
codegirl007 742cfcff6a abstracting to engine package 2026-07-28 21:20:47 -07:00
codegirl007 fc1c39f4f2 render one frame only 2026-07-27 22:32:12 -07:00
codegirl007 33eb055c87 Load and render an atlas 2026-07-27 22:04:35 -07:00
codegirl007 b28c23279b example of rendering a window in SDL3 2026-07-27 21:44:45 -07:00
codegirl007 404e1d86df asset pipeline for packing sprites 2026-07-27 21:32:28 -07:00