I’ve got an app where I’m trying to draw many large polygons. An example of the numbers I’m working with:
- Primitives: 100
- GeometryInstances: 31k
positionsdefining the hierarchies of those Polygon GeometryInstances: 1.8 million
I’ve created a simplified sandcastle (open the console to see draw times) which draws a single polygon but the amount of points defining the hierarchy is editable. It appears drawing a single polygon with many points has similar performance to drawing many polygons with fewer points. If this is not the case, I can create another sandcastle.
My ask is: what can I do to optimize the drawing of a polygon primitive? My desire is to be able to remove those 100 polygons and create a different 100 polygons pretty quickly.
An obvious answer would be to attempt to reduce the amount of points needed to define the polygon hierarchy. Is there something else I can do on the drawing side? Perhaps a more efficient way of defining the PolygonHierarchy?