Following the same logic that you use... have you calculated how much memory do you need to store the memory of a single treeview, or a single scrolling document of just several pages?
Two floats? You are using a memory that is a CPU memory, a big chunk of memory. That does not exist in the GPU. In the GPU the memory is distributed so it can be used in parallel.
Immediate GUI exist because of GPUs, because with GPUs you can draw frames fast. If you look at Imgui code it uses GPU drawing for everything. In fact it uses only two drawing functions copying small rectangles in the screen.
It is drawing a single big chunk of memory what is extremely slow, and you need to do that before you do offsetting.
And if you work with variable data, like a treeview, you need to allocate for a finite amount of memory in the GPU buffers.
Two floats? You are using a memory that is a CPU memory, a big chunk of memory. That does not exist in the GPU. In the GPU the memory is distributed so it can be used in parallel.
Immediate GUI exist because of GPUs, because with GPUs you can draw frames fast. If you look at Imgui code it uses GPU drawing for everything. In fact it uses only two drawing functions copying small rectangles in the screen.
It is drawing a single big chunk of memory what is extremely slow, and you need to do that before you do offsetting.
And if you work with variable data, like a treeview, you need to allocate for a finite amount of memory in the GPU buffers.