HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Static Public Attributes
v1::gfx_surface Class Reference

Public Member Functions

 gfx_surface (vk::SurfaceKHR surface)
 
 gfx_surface (const gfx_surface &)=delete
 
gfx_surfaceoperator= (const gfx_surface &)=delete
 
 gfx_surface (gfx_surface &&)=delete
 
gfx_surfaceoperator= (gfx_surface &&)=delete
 
void set_device (gfx_device *device) noexcept
 
gfx_devicedevice () const noexcept
 
extent2 size () const noexcept
 
void update (extent2 new_size) noexcept
 
draw_context render_start (aarectangle redraw_rectangle)
 
void render_finish (draw_context const &context)
 
void add_delegate (gfx_surface_delegate *delegate) noexcept
 
void remove_delegate (gfx_surface_delegate *delegate) noexcept
 

Data Fields

gfx_surface_state state = gfx_surface_state::has_window
 
gfx_surface_loss loss = gfx_surface_loss::none
 
vk::SurfaceKHR intrinsic
 
vk::SwapchainKHR swapchain
 
uint32_t nrSwapchainImages
 
vk::Extent2D swapchainImageExtent
 
vk::SurfaceFormatKHR swapchainImageFormat
 
std::vector< swapchain_image_infoswapchain_image_infos
 
VmaAllocation depthImageAllocation
 
vk::Image depthImage
 
vk::ImageView depthImageView
 
std::array< VmaAllocation, 1 > colorImageAllocations
 
std::array< vk::Image, 1 > colorImages
 
std::array< vk::ImageView, 1 > colorImageViews
 
std::array< vk::DescriptorImageInfo, 1 > colorDescriptorImageInfos
 
vk::RenderPass renderPass
 
vk::CommandBuffer commandBuffer
 
vk::Semaphore imageAvailableSemaphore
 
vk::Semaphore renderFinishedSemaphore
 
vk::Fence renderFinishedFence
 
std::unique_ptr< gfx_pipeline_image > image_pipeline
 
std::unique_ptr< gfx_pipeline_box > box_pipeline
 
std::unique_ptr< gfx_pipeline_SDF > SDF_pipeline
 
std::unique_ptr< gfx_pipeline_override > override_pipeline
 
std::unique_ptr< gfx_pipeline_tone_mapper > tone_mapper_pipeline
 

Static Public Attributes

static constexpr uint32_t defaultNumberOfSwapchainImages = 2
 
static const vk::Format depthImageFormat = vk::Format::eD16Unorm
 
static const vk::Format colorImageFormat = vk::Format::eR16G16B16A16Sfloat
 

Member Function Documentation

◆ set_device()

void v1::gfx_surface::set_device ( gfx_device * device)
inlinenoexcept

Set GPU device to manage this window. Change of the device may be done at runtime.

Parameters
new_deviceThe device to use for rendering, may be nullptr.

The documentation for this class was generated from the following files: