diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 13:12:01 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 13:12:01 +0100 |
| commit | d1d87447ae44d85b15e748c5b1cc8ccd310f8740 (patch) | |
| tree | 215852cc15df71129b66f0d5c36ccf46930c8df7 /src/3d/renderer.h | |
| parent | e0a92d8c7b5dea290155dd17784686fc9e95a029 (diff) | |
feat(3d): Add scaffolding for visual debugging (Task #18a)
- Added 'src/3d/visual_debug.h/cc' to implement wireframe rendering.
- Integrated VisualDebug into Renderer3D with a static global toggle.
- Added '--debug' command-line option to 'demo64k' and 'test_3d_render' to enable wireframes.
- Updated 'src/gpu/effects/hybrid_3d_effect.h' to expose the debug setter (reverted later as static method used).
- Ensured full cross-platform compatibility (native and Windows) for the new debug module.
- All code guarded by STRIP_ALL for final release.
Diffstat (limited to 'src/3d/renderer.h')
| -rw-r--r-- | src/3d/renderer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/3d/renderer.h b/src/3d/renderer.h index 8cb379b..453daf2 100644 --- a/src/3d/renderer.h +++ b/src/3d/renderer.h @@ -9,6 +9,10 @@ #include "gpu/gpu.h" #include <vector> +#if !defined(STRIP_ALL) +#include "3d/visual_debug.h" +#endif + // Matches the GPU struct layout struct GlobalUniforms { mat4 view_proj; @@ -28,6 +32,10 @@ class Renderer3D { void init(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format); void shutdown(); +#if !defined(STRIP_ALL) + static void SetDebugEnabled(bool enabled) { s_debug_enabled_ = enabled; } +#endif + // Renders the scene to the given texture view (Convenience: creates a pass) void render(const Scene& scene, const Camera& camera, float time, @@ -75,4 +83,9 @@ class Renderer3D { // Max objects capacity static const int kMaxObjects = 100; + +#if !defined(STRIP_ALL) + VisualDebug visual_debug_; + static bool s_debug_enabled_; +#endif }; |
