7#include "../vector_span.hpp"
8#include "../geometry/axis_aligned_rectangle.hpp"
9#include "../rapid/sfloat_rgba16.hpp"
10#include "../rapid/sfloat_rgba32.hpp"
11#include "../rapid/sfloat_rgb32.hpp"
12#include "../rapid/int_abgr8_pack.hpp"
13#include <vulkan/vulkan.hpp>
16namespace hi::inline
v1::pipeline_box {
21struct alignas(16) vertex {
24 sfloat_rgba32 position;
28 sfloat_rgba32 clipping_rectangle;
61 float line_width) noexcept :
63 clipping_rectangle(clipping_rectangle),
64 corner_coordinate(corner_coordinate),
66 fill_color(fill_color),
67 line_color(line_color),
68 line_width(line_width)
72 static vk::VertexInputBindingDescription inputBindingDescription()
74 return {0,
sizeof(
vertex), vk::VertexInputRate::eVertex};
80 {0, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(vertex, position)},
81 {1, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(vertex, clipping_rectangle)},
82 {2, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(vertex, corner_coordinate)},
83 {3, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(vertex, corner_radii)},
84 {4, 0, vk::Format::eR16G16B16A16Sfloat, offsetof(vertex, fill_color)},
85 {5, 0, vk::Format::eR16G16B16A16Sfloat, offsetof(vertex, line_color)},
86 {6, 0, vk::Format::eR32Sfloat, offsetof(vertex, line_width)},
DOXYGEN BUG.
Definition algorithm.hpp:15
Definition corner_radii.hpp:9
Definition pipeline_alpha_vertex.hpp:21
sfloat_rgba32 corner_coordinate
Double 2D coordinates inside the quad, used to determine the distance from the sides and corner insid...
Definition pipeline_box_vertex.hpp:37
sfloat_rgba16 line_color
border color of the box.
Definition pipeline_box_vertex.hpp:49
sfloat_rgba16 fill_color
background color of the box.
Definition pipeline_box_vertex.hpp:45
sfloat_rgba32 corner_radii
Shape of each corner, negative values are cut corners, positive values are rounded corners.
Definition pipeline_box_vertex.hpp:41
Definition sfloat_rgba16.hpp:19
Definition sfloat_rgba32.hpp:15