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

Add Version newtype wrapper #440

Open
Rua opened this issue May 22, 2021 · 3 comments
Open

Add Version newtype wrapper #440

Rua opened this issue May 22, 2021 · 3 comments

Comments

@Rua
Copy link
Contributor

Rua commented May 22, 2021

Ash currently represents Vulkan API versions as u32, and has a bunch of bare functions and constants to deal with them. I think it would be more idiomatic if these were represented as a newtype wrapper Version. Then the constants can be associated constants, and the functions can be methods. I realise that Vulkan itself represents these as uint32_t, so recognising which values are versions may be more difficult.

@MarijnS95
Copy link
Collaborator

MarijnS95 commented May 22, 2021

Curious how much this would conflict with #431 though, but it's definitely more idomatic to use a newtype and methods instead of free functions.

@Ralith
Copy link
Collaborator

Ralith commented May 23, 2021

Feel free to crib openxr::Version

@Rua
Copy link
Contributor Author

Rua commented Aug 23, 2021

Has there been any work on this?

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

3 participants