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

MaxRectBinPack should be multi-threaded #21

Open
stefangordon opened this issue May 31, 2015 · 1 comment
Open

MaxRectBinPack should be multi-threaded #21

stefangordon opened this issue May 31, 2015 · 1 comment

Comments

@stefangordon
Copy link
Contributor

This is one of the slowest parts of the processing right now because the bin packing is single threaded.

A simple option might just be spawning the bin packing off in a task and letting the app continue on to the next texture tile. I'm not sure if this is possible until we remove System.Drawing, as I think creating graphics objects across multiple threads fails.

@stefangordon
Copy link
Contributor Author

We can also look for a more effective way to predict the final tile size. Right now the bin packer starts with a small bin and keeps doubling the size until all the rects fit. This may mean doing the bin packing several times for each image. It is critical that the output textures be certain dimensions though, so just using a giant bin and cropping afterwards won't work.

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