Рет қаралды 82
Currently rewriting the entire BSP rendering to use Retained Mode (VBO + VAO + EBO + Data batching + Texture chains + Shaders) to improve performance as much as possible. Now all the BSP vertex data is uploaded on the GPU only once, so it can be easily accessed using indexes to determine which parts need to be rendered. And because of that, there's no need to constantly push verts to the GPU anymore. I also rewrote the lightmap allocation code to use only a single texture instead (a lightmap atlas), so I can bind the lightmap texture only once, increasing the height when needed and recursively allocate a new block. This reduces the amount of drawcalls needs to be performed. In fact, there's no "AllocBlock: full" limit anymore, since there's only one huge lightmap texture to operate with, so it's limited only by the hardware now.