dsda-doom icon indicating copy to clipboard operation
dsda-doom copied to clipboard

[GL] Use caching/VBOs/display lists for static walls

Open bkoropoff opened this issue 1 year ago • 0 comments

If a wall's draw attributes (vertices, lighting, ...) can't be affected by map specials (elevators/doors/etc), they should be cached, pre-uploaded to the GPU, and GL commands pre-compiled to the greatest extent possible. Calculating these every frame in gld_AddWall incurs a lot of cache misses chasing pointers to segs/lines/sides/vertexes/sectors which could be avoided by just appending "render cached line X" to the draw items. The scene drawing code should likewise be able to avoid touching vertexes and issuing discrete GL commands for static walls. This seems like an easy(-ish) performance win.

bkoropoff avatar Apr 07 '23 01:04 bkoropoff