aui icon indicating copy to clipboard operation
aui copied to clipboard

GPU batching

Open Alex2772 opened this issue 8 months ago • 0 comments

Describe the need of your project

Considering a generic game inventory:

Image

At this moment, AUI will paint every single cell one by one constantly switching between shaders and buffers while rendering different parts of each cell (background -> inset shadow -> border -> item icon -> text of some kind).

Proposed solution

I suggest to introduce a batching algorithm to make the GPU happy.

I assume this has to be done somewhere at renderer level, so if one uses renderer directly within a single view, they can gather performance benefits, still. The batching shouldn't even know about AView concept.

The implementation shouldn't know about OpenGL either, so we can reuse the same techniques as soon as we implement Vulkan/DirectX/Metal renderers.

Influenced by https://github.com/aui-framework/aui/issues/435#issuecomment-2661892154

Alternatives you've considered

Whilst #379 looks promising for this scenario, an initial draw of this frame produces a high spike due to large amounts of draw calls.

Additional context

No response

Alex2772 avatar May 13 '25 05:05 Alex2772