Points geometry at streams, or just marks it dirty when it already holds
those exact arrays — the second of the two lines in
debugDrawStreams' per-frame example.
The three-assignment order is not stylistic. A geometry validates a new
positions against the colours it currently holds, so assigning a
shorter positions array while the old colours are still attached throws;
dropping the colours first is the only order that works for every count
change, including the first call.
When the arrays are unchanged (a stable segment count — see
DebugDrawStreams.resized) this is a single version bump: no
validation scan, no upload sizing change, just the dirty flag every backend
keys its buffer on.
Points
geometryatstreams, or just marks it dirty when it already holds those exact arrays — the second of the two lines in debugDrawStreams' per-frame example.The three-assignment order is not stylistic. A geometry validates a new
positionsagainst the colours it currently holds, so assigning a shorter positions array while the old colours are still attached throws; dropping the colours first is the only order that works for every count change, including the first call.When the arrays are unchanged (a stable segment count — see DebugDrawStreams.resized) this is a single version bump: no validation scan, no upload sizing change, just the dirty flag every backend keys its buffer on.