summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-08 17:23:52 +0100
committerskal <pascal.massimino@gmail.com>2026-02-08 17:23:52 +0100
commit41b64071beba9dd62a2a8f4e915ea104605a4964 (patch)
tree96e72f2ff6da2b17b304714486cd2741d75a31f9 /src/tests
parent45f942ea79647be9f05fe1fe43548b030d191d45 (diff)
fix(3d): Handle user_data meshes in visual debug wireframe rendering
- Check user_data before calling GetMeshAsset() in renderer_draw.cc - Prevents crash when rendering manually loaded OBJ meshes with --debug - Remove duplicate wireframe call in test_mesh.cc (now handled by renderer) - Keep add_mesh_normals() call (not auto-handled by renderer) Fixes: Bus error when running 'test_mesh house.obj --debug' Root cause: GetMeshAsset(0) on non-asset meshes Test: All 32 tests pass, test_mesh works with --debug flag
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_mesh.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/tests/test_mesh.cc b/src/tests/test_mesh.cc
index 0865f80..2129bc8 100644
--- a/src/tests/test_mesh.cc
+++ b/src/tests/test_mesh.cc
@@ -386,11 +386,7 @@ int main(int argc, char** argv) {
dbg.add_mesh_normals(g_scene.objects[1].get_model_matrix(),
(uint32_t)data->vertices.size(),
data->vertices.data());
- dbg.add_mesh_wireframe(g_scene.objects[1].get_model_matrix(),
- (uint32_t)data->vertices.size(),
- data->vertices.data(),
- (uint32_t)data->indices.size(),
- data->indices.data(), vec3(0.0f, 1.0f, 1.0f));
+ // Wireframe is now handled automatically by renderer
}
#endif /* !defined(STRIP_ALL) */