HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
pipeline_flat_device_shared.hpp
1// Copyright Take Vos 2019-2020.
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 "../required.hpp"
8#include "../geometry/axis_aligned_rectangle.hpp"
9#include "../rapid/sfloat_rgba16.hpp"
10#include <vk_mem_alloc.h>
11#include <vulkan/vulkan.hpp>
12#include <mutex>
13
14namespace tt {
15class gfx_device_vulkan;
16}
17
18namespace tt::pipeline_flat {
19struct Image;
20
21struct device_shared final {
22 gfx_device_vulkan const &device;
23
24 vk::ShaderModule vertexShaderModule;
25 vk::ShaderModule fragmentShaderModule;
27
28 device_shared(gfx_device_vulkan const &device);
30
31 device_shared(device_shared const &) = delete;
32 device_shared &operator=(device_shared const &) = delete;
33 device_shared(device_shared &&) = delete;
34 device_shared &operator=(device_shared &&) = delete;
35
39 void destroy(gfx_device_vulkan *vulkanDevice);
40
41 void drawInCommandBuffer(vk::CommandBuffer &commandBuffer);
42
43private:
44 void buildShaders();
45 void teardownShaders(gfx_device_vulkan *vulkanDevice);
46};
47
48}
Definition gfx_device_vulkan.hpp:24
Definition pipeline_flat_device_shared.hpp:21
void destroy(gfx_device_vulkan *vulkanDevice)