You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation: The current renderer model does not only hold both raw and calculated vertices in memory, but also a matrix. The CPU is used to make calculations with the modelMatrix, which should be done on the GPU. This leads to
more GC calls
more CPU usage
Proposed solution: Store raw vertex data on the GPU in batches. Renderable structures only save buffer ID, offset and length of data as well as the matrix. Once called to render, the matrix is pushed into the GPU and the batch renderer renders the vertices with the specified offset. This saves a) the memory/GC problem b) the matrix calculation provlem
Disadvantages: This basically makes batched renderers unnecessary. Also, it is not quite sure what happens once certain vertices are not needed. However, one has to be reminded that every vertex buffer basically is used by the game, as data structures are static and do not change often.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: