vokegpu / ekg-ui-library

High-performance multi-platform modular GUI library with GPU API modular support: OpenGL/Vulkan accelerated
MIT License
73 stars 3 forks source link

Too many vertices being draw at gpu allocator batch system. #4

Closed MrsRina closed 1 year ago

MrsRina commented 1 year ago

It is a common issue of rendering, a simple rectangle is the sum of two triangles, or be, six vertices, but it can be reduced to only four vertices using the concept of indexing rendering. But what is the problem? The problem is with the UV buffers.

UV buffers or more known as texture coordinates buffer store the coordinates of every batched shape, note that I use batched word, because the texts on screen (textured shapes) are concave, not a rectangle. But soon I will implement an index buffer to reduce the amount of vertices in scene, of course, it is a problem that I do not want to think how to solve now.

Referred link: Link