Description
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::Id
s 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::Primitive
s when drawing the Ui
so that they can be rendered/optimised along with the rest of the Ui
's graphics.
cc @Boscop