binary1248/SFGUI — comment on commit 035d96af5b5980cbcd8852f40279534c921ba04a
File:  line 0
By binary1248:

With this new way of rendering, I got rid of the purely immediate-style drawing of widgets. Instead they are all stateful now meaning that you have to tell them when you want them to be drawn or not. It makes sense, because in almost all cases you only have a single GUI instance and it only renders to one target ( the main window ). All objects in the GUI are part of it and there should be no reason to manually draw each widget by itself because that's what the GUI is there to manage. It might seem strange after using SFML to draw for so long, but this is the more efficient and GPU friendly way of rendering. If you really need to draw single widgets themselves, you could still manage showing and hiding them with Show() and calling Display(). You would create something like a window with no style to contain widgets that should be shown together and hidden together and control whether that window is drawn or not. I must stress that this method of drawing is NOT RECOMMENDED, and performance will suffer horribly. As such you really shouldn't draw this way in production code. I might consider allowing attaching separate instances of the renderer to widgets to be able to control the rendering more, but the whole idea is to reduce the API overhead as much as possible and in that sense this would only be useful in cases like yours where you want to draw single widgets by themselves. I'm just wondering, why do you have to render a single widget by itself instead of everything together? If it's because you use one view per widget, I will add support for custom views per widget as soon as I have more time, as part of implementing Viewport drawing again.