Making use of the GPU to render huge amount of objects

Yes, found that out myself just now. Too bad, I was hoping we could do something like a “reverse” translate(), and move the viewport on a layer after we placed the objects. Meaning, place all the objects in setup(), regardless if they are on the canvas or not and then call myLayer.translate() later in the draw() method.

I don’t think that SVG can handle the amount of objects we’re planning to draw, so we would most likely face the same problem here and have to reduce the amount of objects drawn. In that case would could just stick with p5.

The fallback idea was to introduce something like level of detail in games, and reduce clusters of objects to single objects, when the graph is zoomed out. I was just hoping, we could avoid that and just throw everything at the GPU and let it do all the work.

Maybe we’ll look into one the game engines, but learning these will probably be at least as much work as filtering our objects to display.

Thanks again.

1 Like