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/module.hpp"
8#include "../geometry/module.hpp"
9#include "../vector_span.hpp"
10#include "../color/module.hpp"
11#include <vma/vk_mem_alloc.h>
12#include <vulkan/vulkan.hpp>
13#include <mutex>
14
15namespace hi::inline v1 {
16class gfx_device_vulkan;
17
18namespace pipeline_alpha {
19struct Image;
20struct vertex;
21
22struct device_shared final {
23 gfx_device_vulkan const& device;
24
25 vk::ShaderModule vertexShaderModule;
26 vk::ShaderModule fragmentShaderModule;
28
29 device_shared(gfx_device_vulkan const& device);
31
32 device_shared(device_shared const&) = delete;
33 device_shared& operator=(device_shared const&) = delete;
34 device_shared(device_shared&&) = delete;
35 device_shared& operator=(device_shared&&) = delete;
36
40 void destroy(gfx_device_vulkan const*vulkanDevice);
41
42 void drawInCommandBuffer(vk::CommandBuffer const& commandBuffer);
43
44 static void place_vertices(vector_span<vertex>& vertices, aarectangle clipping_rectangle, quad box, float alpha);
45
46private:
47 void buildShaders();
48 void teardownShaders(gfx_device_vulkan const*vulkanDevice);
49};
50
51} // namespace pipeline_alpha
52} // namespace hi::inline v1
DOXYGEN BUG.
Definition algorithm.hpp:13
Definition quad.hpp:17
Definition gfx_device_vulkan.hpp:21
Definition pipeline_alpha_device_shared.hpp:22
void destroy(gfx_device_vulkan const *vulkanDevice)
Definition vector_span.hpp:133