Implementing batching in the renderer #952
Replies: 1 comment
|
Welp, it's not in the nightly yet, but I"ve implemented batching (and other optimizations) in IKEMEN. :-) Big thanks to @samhocevar , I know you've moved on but this wouldn't be possible without the groundwork you laid with your rendering layer. My optimizations include:
For the font library, the first thing I initially did was just collect all of the vertices for a single Printf call and 2024-04-08.04-18-44.online-video-cutter.com.mp4There's also a lot of optimizations with regards to the objects created by the batching scheme to make sure they do not impact the garbage collector. And there's still more things that can be done. When I figure out what it means to 'perform tiling on the GPU' we'll really be in business :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Right now, the renderer performs a draw call for each individual texture and geometry that must be drawn in the screen. This results in a lot of inefficient context change, GPU calling and CGO calls that impair frame rate in different computers, something that can be observed in things like text rendering or in-game particles (made by lots of explods). My proposal is to rewrite/refactor code where necessary as to minimize instances of data transfering from the CPU to the GPU by sending it in batches, and thus achieving greater frame rates.
@samhocevar suggested some changes to be made in order to make this possible (citing from him):
All reactions