This function is the fastest available for the buffer to set values.
From the managed world (C#, .NET) point of view there is not much to be done here. For RhinoCycles I also am using this approach, although I’m not pinning buffers, since that is in unmanaged world:
I haven’t done any profiling of this before, so lets take a look.
On my M2 Max at 2598x1678 it takes between 20 and 30ms for me, but not 50ms.
But on my Windows machine with Ryzen 9 7900X (12-core) it takes 5-6 times longer.
I hope there is room for improvement there. I logged a bug report to track that: RH-83576 SetValues on framebuffer slow.
No, that is fine.
I don’t know, RhinoCycles hasn’t used OpenGL drawing in a long time, and I’m not sure in what state that particular mechanism is. But back in the day when it did there was a bit of C/C++ code that I PInvoked to do that.
Lets see if we can have @johnc or @andy make performance improvements in SetValues.

