summaryrefslogtreecommitdiff
path: root/src/3d/renderer_draw.cc
AgeCommit message (Collapse)Author
13 hoursfix(3d): Handle user_data meshes in visual debug wireframe renderingskal
- 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
16 hoursfix: Make PlaneData struct visible to renderer_draw.ccskal
16 hoursfeat: Integrate plane_distance into renderer and scene loaderskal
This commit integrates the plane_distance functionality by: - Adding shared_user_data to Object3D for storing type-specific data. - Modifying SceneLoader to read and store plane_distance in shared_user_data for PLANE objects. - Updating ObjectData struct in renderer.h to use params.x for object type and params.y for plane_distance. - Modifying Renderer3D::update_uniforms to populate ObjectData::params.y with plane_distance for PLANE objects. - Adjusting blender_export.py to correctly export plane_distance and reorder quaternion components. A manual step is required to update WGSL shaders to utilize ObjectData.params.y for plane distance calculations.
21 hoursrefactor(3d): Split Renderer3D into modular files and fix compilation.skal