Remove SegmentVector abstraction
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
We introduced `SegmentVector` class to be able to render layers with >2^16 vertices — by maintaining multiple views ("segments") in the vertex array with different offsets. However, according to [WebGL best practices](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices), `OES_element_index_uint` extension that allows 32-bit vertex indexing as opposed to 16-bit one is universally supported and can be relied upon. We could use it to remove the segments abstraction, using the extension to render >2^16 vertices with a single draw draw call, and removing the complexity around splitting and maintaining segments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SegmentVector class and the code that maintains segment offsets, then inspect the WebGL index-buffer path and OES_element_index_uint support. Done means the segment abstraction and its maintenance complexity are removed while layers with more than 2^16 vertices render through a single draw call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100