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

Update icosphere dependency and add a limit to subdivisions. #379

Merged
merged 1 commit into from
Aug 28, 2020
Merged

Update icosphere dependency and add a limit to subdivisions. #379

merged 1 commit into from
Aug 28, 2020

Conversation

OptimisticPeach
Copy link
Contributor

The newest version of hexasphere is essentially the same as the one being used currently, it just happens to be that I made an error when publishing 0.1.7 and had to yank it. Unfortunately, the theoretical 0.1.8 would've broken compatibility for standalone users of 0.1.7 (but not 0.1.6), so I decided to bump it to 1.0.0.

The limit to subdivisions occurs because subdivision 80 produces 65612 vertices, which is more than currently supported by the 16 bit indices (which caps out at 65535 vertices).

@karroffel karroffel added the A-Rendering Drawing game state to the screen label Aug 28, 2020
let temp_sphere = Hexasphere::new(sphere.subdivisions, |_| ());

panic!(
"Cannot create an icosphere of {} subdivisions due to there being more than 2¹⁶ vertices being generated: {} (Limited to 65535 vertices or 79 subdivisions)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if that message using the unicode ¹⁶ is potentially a compatability hazard. It might be worth saying 2¹⁶ (65536). Also I imagine we can only actually have 65535 vertices anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to include the 2^16 anyway. I think that just sticking to the extra note at the end which remarks there being a limit is the correct call.

@AngelOnFira
Copy link
Contributor

@cart could you rerun the CI jobs for this PR? (Artifact of #380)

@cart
Copy link
Member

cart commented Aug 28, 2020

Awesome. Thanks!

@cart cart merged commit c40e29b into bevyengine:master Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants