HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
gfx_surface_delegate_vulkan.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 "gfx_surface_delegate.hpp"
8#include "../geometry/module.hpp"
9#include <vulkan/vulkan.hpp>
10#include <vma/vk_mem_alloc.h>
11#include <vector>
12#include <cstdint>
13
14namespace hi::inline v1 {
15
23public:
36 VmaAllocator allocator,
37 vk::Instance instance,
38 vk::Device device,
39 vk::Queue graphics_queue,
40 uint32_t graphics_queue_family_index) noexcept = 0;
41
53 virtual void
54 build_for_new_swapchain(std::vector<vk::ImageView> const& views, vk::Extent2D size, vk::SurfaceFormatKHR format) noexcept = 0;
55
70 virtual void draw(uint32_t swapchain_index, vk::Semaphore start, vk::Semaphore finish, vk::Rect2D render_area) noexcept = 0;
71};
72
73} // namespace hi::inline v1
DOXYGEN BUG.
Definition algorithm.hpp:13
Definition gfx_surface_delegate.hpp:9
A delegate for drawing on a window below the HikoGUI user interface.
Definition gfx_surface_delegate_vulkan.hpp:22
virtual void build_for_new_device(VmaAllocator allocator, vk::Instance instance, vk::Device device, vk::Queue graphics_queue, uint32_t graphics_queue_family_index) noexcept=0
The vulkan device has been initialized.
virtual void draw(uint32_t swapchain_index, vk::Semaphore start, vk::Semaphore finish, vk::Rect2D render_area) noexcept=0
Draw using vulkan API.
virtual void build_for_new_swapchain(std::vector< vk::ImageView > const &views, vk::Extent2D size, vk::SurfaceFormatKHR format) noexcept=0
The swap-chain has been build.