diff options
Diffstat (limited to 'src/3d/renderer.h')
| -rw-r--r-- | src/3d/renderer.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/3d/renderer.h b/src/3d/renderer.h index e87d47a..8cb379b 100644 --- a/src/3d/renderer.h +++ b/src/3d/renderer.h @@ -28,25 +28,24 @@ class Renderer3D { void init(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); void shutdown(); - // Renders the scene to the given texture view (Convenience: creates a pass) + // Renders the scene to the given texture view (Convenience: creates a pass) - void render(const Scene& scene, const Camera& camera, float time, + void render(const Scene& scene, const Camera& camera, float time, - WGPUTextureView target_view, WGPUTextureView depth_view_opt = nullptr); + WGPUTextureView target_view, + WGPUTextureView depth_view_opt = nullptr); - + // Records draw commands to an existing pass. - // Records draw commands to an existing pass. + // Assumes the pass has a compatible pipeline (or we set it here). - // 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. - // 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 draw(WGPURenderPassEncoder pass, const Scene& scene, const Camera& camera, float time); - - - - void set_noise_texture(WGPUTextureView noise_view); + void set_noise_texture(WGPUTextureView noise_view); // Resize handler (if needed for internal buffers) void resize(int width, int height); |
