Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow rendering from RGBA buffer to wde.Window #16

Closed
errnoh opened this issue Oct 14, 2012 · 1 comment
Closed

Slow rendering from RGBA buffer to wde.Window #16

errnoh opened this issue Oct 14, 2012 · 1 comment

Comments

@errnoh
Copy link
Contributor

errnoh commented Oct 14, 2012

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)

@errnoh
Copy link
Contributor Author

errnoh commented Oct 18, 2012

Fixed in fbdd89a

@errnoh errnoh closed this as completed Oct 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant