file
Integration.hConversion of Vulkan math types.
Provides conversion for the following types:
VkClearColorValue is an union
, so it's convertible from/to a floating-point type as well as integer types, but you have to ensure the type is correct for the API call it'll be used in. Conversion of VkClearColorValue to Color3 is not allowed, as it would lead to loss of the alpha value. In the other direction, alpha is set to 1.0f
.
Third dimension of VkViewport is a depth range, third dimension of VkClearRect is an attachment layer range. In both cases you can use Range3D::
Since Magnum uses a signed type for all offsets, sizes and rectangles, the unsigned VkExtent2D / VkExtent3D types are convertible to signed types as well. The VkRect2D and VkClearRect is a mixed unsigned + signed type, which corresponds to a signed range on Magnum side.
Example usage:
VkOffset2D a{64, 32}; Vector2i b(a); using namespace Math::Literals; VkClearColorValue c = VkClearColorValue(0xff9391_srgbf);