7#include "gfx_pipeline_vulkan.hpp"
8#include "../container/module.hpp"
9#include "../image/module.hpp"
10#include "../macros.hpp"
11#include <vma/vk_mem_alloc.h>
14namespace hi {
inline namespace v1 {
70 line_width(line_width)
74 static vk::VertexInputBindingDescription inputBindingDescription()
76 return {0,
sizeof(
vertex), vk::VertexInputRate::eVertex};
88 {6, 0, vk::Format::eR32Sfloat,
offsetof(vertex, line_width)},
94 sfloat_rg32 windowExtent =
extent2{0.0, 0.0};
95 sfloat_rg32 viewportScale =
scale2{0.0, 0.0};
99 return {{vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0,
sizeof(
push_constants)}};
104 gfx_device
const& device;
106 vk::ShaderModule vertexShaderModule;
107 vk::ShaderModule fragmentShaderModule;
123 void drawInCommandBuffer(vk::CommandBuffer
const& commandBuffer);
125 static void place_vertices(
149 void draw_in_command_buffer(vk::CommandBuffer commandBuffer,
draw_context const&
context)
override;
152 push_constants pushConstants;
154 vk::Buffer vertexBuffer;
160 [[
nodiscard]]
size_t getDescriptorSetVersion()
const override;
162 [[
nodiscard]] vk::VertexInputBindingDescription createVertexInputBindingDescription()
const override;
166 void build_vertex_buffers()
override;
167 void teardown_vertex_buffers()
override;
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
A color for each corner of a quad.
Definition quad_color.hpp:20
Class which represents an axis-aligned rectangle.
Definition aarectangle.hpp:29
The 4 radii of the corners of a quad or rectangle.
Definition corner_radii.hpp:19
A high-level geometric extent.
Definition extent2.hpp:29
Draw context for drawing using the HikoGUI shaders.
Definition draw_context.hpp:208
Definition gfx_pipeline_box_vulkan.hpp:18
Definition gfx_pipeline_box_vulkan.hpp:23
sfloat_rgba16 line_color
border color of the box.
Definition gfx_pipeline_box_vulkan.hpp:52
sfloat_rgba32 corner_radii
Shape of each corner, negative values are cut corners, positive values are rounded corners.
Definition gfx_pipeline_box_vulkan.hpp:44
sfloat_rgba32 corner_coordinate
Double 2D coordinates inside the quad, used to determine the distance from the sides and corner insid...
Definition gfx_pipeline_box_vulkan.hpp:40
sfloat_rgba16 fill_color
background color of the box.
Definition gfx_pipeline_box_vulkan.hpp:48
sfloat_rgba32 position
The pixel-coordinates where the origin is located relative to the bottom-left corner of the window.
Definition gfx_pipeline_box_vulkan.hpp:26
sfloat_rgba32 clipping_rectangle
The position in pixels of the clipping rectangle relative to the bottom-left corner of the window,...
Definition gfx_pipeline_box_vulkan.hpp:31
Definition gfx_pipeline_box_vulkan.hpp:93
Definition gfx_pipeline_box_vulkan.hpp:103
void destroy(gfx_device const *vulkanDevice)
Definition gfx_pipeline_box_vulkan_impl.hpp:117