Files
metabuilder/gameengine/src
johndoe6345789 8bed50f43d feat(gameengine): fix BSP winding + decompose loader into 7 chainable workflow steps
Fix CW→CCW winding bug on polygon/mesh faces (types 1,3) that caused
backface culling to discard half the geometry. Decompose the monolithic
bsp.load step (1028 lines) into atomic workflow steps chainable via
JSON connections — each step only runs when connected:

- bsp.load: open pk3, read + validate BSP, store raw data in context
- bsp.lightmap_atlas: build lightmap atlas, upload to GPU
- bsp.parse_spawn: parse entity lump for spawn point
- bsp.build_geometry: build face geometry with CW→CCW winding fix
- bsp.extract_textures: load textures from pk3 with mipmaps
- bsp.upload_geometry: upload merged VB/IB to GPU
- bsp.build_collision: create Bullet physics convex hull collision

Shared BSP structs extracted to bsp_types.hpp. Workflow JSON updated
to chain: load → lightmap → geometry → textures → upload → collision → spawn.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 13:27:55 +00:00
..
2026-03-09 22:30:41 +00:00
2026-03-09 22:30:41 +00:00
2026-03-09 22:30:41 +00:00
2026-03-09 22:30:41 +00:00