Write Mesh data straight to the frame buffer? [Rhino.Display Question]

Hi All,

I’m developing a Grasshopper plugin in C# that runs a mesh-based multi-agent simulation on the GPU and then updates the display each iteration. Right now, my biggest bottleneck is reconstructing/updating a full Rhino.Geometry.Mesh every frame before it’s drawn in the viewport.

Are there any recommended alternative approaches for drawing large, dynamic meshes without rebuilding a Rhino.Geometry.Mesh each frame?

Ideally, I’d like to stream raw mesh data (vertex positions, normals, face indices, and vertex colors) directly into the OpenGL frame buffer (using VBOs or a similar mechanism) and only build the Rhino mesh once the simulation is finished.

I had attempted to create a Conduit class that inherits from Rhino.Display.DisplayConduit and uploads flattened arrays of float positions, float normals, and int indices to VBOs in PostDrawObjects without success. I was mostly vibe coding the class as a test, as I wasn’t sure on the best direction to take.

I’m relatively new to the Rhino drawing pipeline, so any advice or examples would be hugely appreciated!