HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
pipeline_alpha_device_shared.hpp
1// Copyright Take Vos 2022.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "../utility.hpp"
8#include "../geometry/rectangle.hpp"
9#include "../vector_span.hpp"
10#include "../color/color.hpp"
11#include "../color/quad_color.hpp"
12#include "../geometry/corner_radii.hpp"
13#include <vma/vk_mem_alloc.h>
14#include <vulkan/vulkan.hpp>
15#include <mutex>
16
17namespace hi::inline v1 {
18class gfx_device_vulkan;
19
20namespace pipeline_alpha {
21struct Image;
22struct vertex;
23
24struct device_shared final {
25 gfx_device_vulkan const& device;
26
27 vk::ShaderModule vertexShaderModule;
28 vk::ShaderModule fragmentShaderModule;
30
31 device_shared(gfx_device_vulkan const& device);
33
34 device_shared(device_shared const&) = delete;
35 device_shared& operator=(device_shared const&) = delete;
36 device_shared(device_shared&&) = delete;
37 device_shared& operator=(device_shared&&) = delete;
38
42 void destroy(gfx_device_vulkan *vulkanDevice);
43
44 void drawInCommandBuffer(vk::CommandBuffer& commandBuffer);
45
46 static void place_vertices(vector_span<vertex>& vertices, aarectangle clipping_rectangle, quad box, float alpha);
47
48private:
49 void buildShaders();
50 void teardownShaders(gfx_device_vulkan *vulkanDevice);
51};
52
53} // namespace pipeline_alpha
54} // namespace hi::inline v1
Utilities used by the HikoGUI library itself.
DOXYGEN BUG.
Definition algorithm.hpp:15
Class which represents an axis-aligned rectangle.
Definition axis_aligned_rectangle.hpp:20
Definition quad.hpp:17
Definition gfx_device_vulkan.hpp:21
Definition pipeline_alpha_device_shared.hpp:24
void destroy(gfx_device_vulkan *vulkanDevice)
Definition vector_span.hpp:134