I've been messing around with high fps rendering with go.wde and I'm coming to conclusion that by allowing straight access to buffer would be really helpful for any fast paced rendering.
This would also benefit much from high speed copying from RGBA (and the other usual ones possibly?) buffers.
There's actually ready code to do just that in wde/xgb at https://github.com/BurntSushi/xgbutil/blob/master/xgraphics/convert.go . It just needs to be opened for use and other platforms would need to have similar interface.
rgba -> rgba seems to be blazing fast. No idea what is actually going there. Still, the test seems to say that it's doing what it should. (edit: well, probably just some fast copy instruction of memory block, since the data doesn't actually need to be changed)
(alpha was discarded on win.Window implementation)
win.Window gained 6-7x speed (windows workstation)
xgb.Window gained 4x speed (windows workstation)
I've been messing around with high fps rendering with go.wde and I'm coming to conclusion that by allowing straight access to buffer would be really helpful for any fast paced rendering.
This would also benefit much from high speed copying from RGBA (and the other usual ones possibly?) buffers. There's actually ready code to do just that in wde/xgb at https://github.com/BurntSushi/xgbutil/blob/master/xgraphics/convert.go . It just needs to be opened for use and other platforms would need to have similar interface.
I've made benchmarks for approach like this, those can be found at: https://github.com/errnoh/wde-drawbench
rgba -> rgba seems to be blazing fast. No idea what is actually going there. Still, the test seems to say that it's doing what it should. (edit: well, probably just some fast copy instruction of memory block, since the data doesn't actually need to be changed)
(alpha was discarded on win.Window implementation) win.Window gained 6-7x speed (windows workstation) xgb.Window gained 4x speed (windows workstation)