You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a Batch (or better name) Widget that allows for instantiating a list of graphics primitives without requiring unique widget::Ids and positions within the widget_graph for each one. #841
At the moment, instantiating graphics primitives like Rectangle or Line requires that each has its own unique slot within the widget_graph, and in turn requires they have their own widget::Ids and other associated widget information. This is fine and useful for most cases, however can potentially cause trouble when a user requires instantiating thousands or more of them as discussed here. In cases like this, it would be much more efficient to allow the user to instantiate a single widget that could represent a whole list of graphics primitives.
I can picture this widget being something like Batch<T> where T is some graphics primitive.
Each primitive in the list would then be returned as render::Primitives when drawing the Ui so that they can be rendered/optimised along with the rest of the Ui's graphics.