-
Notifications
You must be signed in to change notification settings - Fork 2
Improve batched renderer #34
Copy link
Copy link
Open
Labels
Milestone
Description
abc013
opened on Nov 10, 2020
Issue body actions
- 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.
Reactions are currently unavailable