summaryrefslogtreecommitdiff
path: root/src/3d/renderer.h
diff options
context:
space:
mode:
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);