Hello,
I use SFML to render my GUI, meaning that I implement the widgets, containers, event handlers etc. myself.
I have many Widgets of different types in the Software, and because of that, I am worried about the drawing performance.
Every widget holds a vector of it's components (sf::Drawable derivatives). For the example, buttons consist of rounded rectangles (custom shapes) which is textured, an outline, a sf::Text, and so on. It gets way more complicated with more complex composit widgets. All that would result in a very high number of draw calls.
Now, I read in the docs that it's especially slow to change the current texture (I think it's because of the underlying openGL bind () or whatever), so I think I can speed things up by drawing all the buttons with the same texture first.
Are there any further accelerations I should be aware of?
I read something about the sf:: Vertexarray, but I don't know how that would help me, because it seems like it's only for groups of primitives like tiles.
Thanks in advance