ash icon indicating copy to clipboard operation
ash copied to clipboard

Add `Version` newtype wrapper

Open Rua opened this issue 4 years ago • 3 comments

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.

Rua avatar May 22 '21 10:05 Rua

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.

MarijnS95 avatar May 22 '21 10:05 MarijnS95

Feel free to crib openxr::Version

Ralith avatar May 23 '21 16:05 Ralith

Has there been any work on this?

Rua avatar Aug 23 '21 17:08 Rua