summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-02 13:12:01 +0100
committerskal <pascal.massimino@gmail.com>2026-02-02 13:12:01 +0100
commitd1d87447ae44d85b15e748c5b1cc8ccd310f8740 (patch)
tree215852cc15df71129b66f0d5c36ccf46930c8df7 /src/tests
parente0a92d8c7b5dea290155dd17784686fc9e95a029 (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/tests')
-rw-r--r--src/tests/test_3d_render.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tests/test_3d_render.cc b/src/tests/test_3d_render.cc
index a87897f..003eeaf 100644
--- a/src/tests/test_3d_render.cc
+++ b/src/tests/test_3d_render.cc
@@ -171,9 +171,20 @@ void gen_periodic_noise(uint8_t* buffer, int w, int h, const float* params,
procedural::make_periodic(buffer, w, h, p_params, 1);
}
-int main() {
+int main(int argc, char** argv) {
printf("Running 3D Renderer Test...\n");
+#if !defined(STRIP_ALL)
+ for (int i = 1; i < argc; ++i) {
+ if (strcmp(argv[i], "--debug") == 0) {
+ Renderer3D::SetDebugEnabled(true);
+ }
+ }
+#else
+ (void)argc;
+ (void)argv;
+#endif
+
PlatformState platform_state = {};
platform_init(&platform_state, false, nullptr, nullptr);