summaryrefslogtreecommitdiff
path: root/src/3d/renderer.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-01 14:58:05 +0100
committerskal <pascal.massimino@gmail.com>2026-02-01 14:58:05 +0100
commit1481b0a6313b725eec3e3ebeea085e98703df00f (patch)
tree8fbfc1af57423afc4ca08eb05713f8c17067c3f9 /src/3d/renderer.h
parentd4120e50c16ca6c71294cbf3cd614f9680b0e299 (diff)
feat(assets): Implement robust procedural asset generation pipeline
- Updated asset_packer to correctly parse PROC(...) syntax using regex, handling nested commas. - Implemented runtime dispatch in AssetManager for procedural generation with dynamic memory management. - Added procedural generator functions (noise, grid, periodic). - Added comprehensive tests for procedural asset lifecycle (generation, caching, invalidation). - Fixed C++ string literal escaping in asset_packer.
Diffstat (limited to 'src/3d/renderer.h')
-rw-r--r--src/3d/renderer.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/3d/renderer.h b/src/3d/renderer.h
index dda6229..e87d47a 100644
--- a/src/3d/renderer.h
+++ b/src/3d/renderer.h
@@ -28,12 +28,25 @@ class Renderer3D {
void init(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format);
void shutdown();
- // Renders the scene to the given texture view
- void render(const Scene& scene, const Camera& camera, float time,
- WGPUTextureView target_view,
- WGPUTextureView depth_view_opt = nullptr);
+ // Renders the scene to the given texture view (Convenience: creates a pass)
- void set_noise_texture(WGPUTextureView noise_view);
+ void render(const Scene& scene, const Camera& camera, float time,
+
+ WGPUTextureView target_view, WGPUTextureView depth_view_opt = nullptr);
+
+
+
+ // Records draw commands to an existing pass.
+
+ // Assumes the pass has a compatible pipeline (or we set it here).
+
+ // Note: Caller must ensure depth/color attachments are set up correctly in the pass.
+
+ void draw(WGPURenderPassEncoder pass, const Scene& scene, const Camera& camera, float time);
+
+
+
+ void set_noise_texture(WGPUTextureView noise_view);
// Resize handler (if needed for internal buffers)
void resize(int width, int height);