forked from 1b-agent/opencadstudio-upstream
Command-preview / interim / grip-drag wires were appended into the main wire buffer (all_wires), so every drag frame re-packed and re-uploaded the entire batched base set — O(N) per move even though only the small overlay changed. Split them out: build_primitive keeps `wires` as the cached base only and passes the overlay as a separate `preview_wires` Arc. The base keeps the stable tile content id (no per-frame nonce), so its buffer stays resident and is not re-uploaded during a drag. The overlay uploads to its own small gpu_preview_wires buffer each frame and draws on top in the wire pass (same pipeline, same order/depth). The dragged entity still renders highlighted via its selected-path tessellation. With the no-re-tess changes, a grip / command drag now costs a single small overlay upload per move and nothing else. Co-Authored-By: Claude Opus 4.8 <[email protected]>