diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-06 08:05:20 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-06 08:05:20 +0100 |
| commit | 8ded2005d441f8aab44c833fc658d9622c788ebd (patch) | |
| tree | efaf714b636788148db583903bfbff3b015f3f58 /CMakeLists.txt | |
| parent | 1ec5d1ae48d1dd3290992ba63a8ec581af02b9dd (diff) | |
feat(tests): Add test_mesh tool for OBJ loading and normal visualization
Implemented a new standalone test tool 'test_mesh' to:
- Load a .obj file specified via command line.
- Display the mesh with rotation and basic lighting on a tiled floor.
- Provide a '--debug' option to visualize vertex normals as cyan lines.
- Updated asset_packer to auto-generate smooth normals for OBJs if missing.
- Fixed various WGPU API usage inconsistencies and build issues on macOS.
- Exposed Renderer3D::GetVisualDebug() for test access.
- Added custom Vec3 struct and math utilities for OBJ parsing.
This tool helps verify mesh ingestion and normal computation independently of the main demo logic.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e79ba4..ff47cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -375,6 +375,10 @@ if(DEMO_BUILD_TESTS) add_demo_executable(test_3d_physics src/tests/test_3d_physics.cc ${PLATFORM_SOURCES} ${GENERATED_TIMELINE_CC} ${GEN_DEMO_CC} ${GENERATED_MUSIC_DATA_CC}) target_link_libraries(test_3d_physics PRIVATE 3d gpu audio procedural util ${DEMO_LIBS}) add_dependencies(test_3d_physics generate_timeline generate_demo_assets generate_tracker_music) + + add_demo_executable(test_mesh src/tests/test_mesh.cc ${PLATFORM_SOURCES} ${GENERATED_TIMELINE_CC} ${GEN_DEMO_CC} ${GENERATED_MUSIC_DATA_CC}) + target_link_libraries(test_mesh PRIVATE 3d gpu audio procedural util ${DEMO_LIBS}) + add_dependencies(test_mesh generate_timeline generate_demo_assets generate_tracker_music) endif() #-- - Extra Tools -- - @@ -398,4 +402,4 @@ add_custom_target(final add_custom_target(pack_source COMMAND tar -czf demo_all.tgz --exclude=.git --exclude=build* --exclude=.gemini* --exclude=*.tgz --exclude=*.zip --exclude=.DS_Store . WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) +)
\ No newline at end of file |
