Skip to content

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

Open
@mitchmindtree

Description

@mitchmindtree

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.

cc @Boscop

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions