I missed this part when repurposing the vboindex members to store the index buffer offsets.
However, since both indices are needed, they need another set of variables.
On a fast and modern graphics card this is a lot faster than doing it per subsector but it may not be without drawbacks on older hardware so it will require some testing on older hardware.
For me Frozen Time's view over the bridge went from 46 fps to 51 fps with this change, the time saved was roughly 2 ms.
- added thread_local to some static arrays being used for setting up dynamic lights.
Right now it's of little consequence but these will have to be maintained per thread if the render data setup is done by worker tasks.