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

Dynamic PSO states refactor #2944

Merged
merged 1 commit into from
Aug 8, 2019
Merged

Dynamic PSO states refactor #2944

merged 1 commit into from
Aug 8, 2019

Conversation

kvark
Copy link
Member

@kvark kvark commented Aug 8, 2019

Fixes #2905
PR checklist:

  • make succeeds (on *nix)
  • make reftests succeeds
  • tested examples with the following backends:
  • rustfmt run on changed code

@kvark
Copy link
Member Author

kvark commented Aug 8, 2019

Side note on enum -> Option conversions. At some point in the past, I suggested to use enums for cleaner semantics at the type level. Now it's more clear that type level clarity is less important here as just being straight and simple. Option gives you that, without sacrificing the type safety.

/// A generic struct holding the properties of two sides of a polygon.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Sided<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just PolygonFaces or similar?

@kvark
Copy link
Member Author

kvark commented Aug 8, 2019 via email

bors bot added a commit that referenced this pull request Aug 8, 2019
2944: Dynamic PSO states refactor r=grovesNL a=kvark

Fixes #2905
PR checklist:
- [x] `make` succeeds (on *nix)
- [x] `make reftests` succeeds
- [ ] tested examples with the following backends:
- [ ] `rustfmt` run on changed code


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
@bors
Copy link
Contributor

bors bot commented Aug 8, 2019

Build succeeded

@bors bors bot merged commit e6c4169 into gfx-rs:master Aug 8, 2019
@kvark kvark deleted the dynamic branch August 8, 2019 14:28
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

Successfully merging this pull request may close these issues.

More dynamic states
2 participants