HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields | Static Public Attributes
tt::gfx_surface_vulkan Class Referencefinal
Inheritance diagram for tt::gfx_surface_vulkan:
tt::gfx_surface tt::gui_window_vulkan_macos

Public Types

using super = gfx_surface
 

Public Member Functions

 gfx_surface_vulkan (gfx_system &system, vk::SurfaceKHR surface)
 
 gfx_surface_vulkan (const gfx_surface_vulkan &)=delete
 
gfx_surface_vulkanoperator= (const gfx_surface_vulkan &)=delete
 
 gfx_surface_vulkan (gfx_surface_vulkan &&)=delete
 
gfx_surface_vulkanoperator= (gfx_surface_vulkan &&)=delete
 
void init () override
 
void set_device (gfx_device *device) noexcept override
 
gfx_device_vulkanvulkan_device () const noexcept
 
extent2 update (extent2 minimum_size, extent2 maximum_size) noexcept override
 Update the surface.
 
std::optional< draw_contextrender_start (aarectangle redraw_rectangle) override
 
void render_finish (draw_context const &context, color background_color) override
 
- Public Member Functions inherited from tt::gfx_surface
 gfx_surface (const gfx_surface &)=delete
 
gfx_surfaceoperator= (const gfx_surface &)=delete
 
 gfx_surface (gfx_surface &&)=delete
 
gfx_surfaceoperator= (gfx_surface &&)=delete
 
 gfx_surface (gfx_system &system)
 
gfx_devicedevice () const noexcept
 
void set_closed () noexcept
 
bool is_closed () const noexcept
 

Data Fields

vk::SurfaceKHR intrinsic
 
vk::SwapchainKHR swapchain
 
int 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, 2 > colorImageAllocations
 
std::array< vk::Image, 2 > colorImages
 
std::array< vk::ImageView, 2 > colorImageViews
 
std::array< vk::DescriptorImageInfo, 2 > colorDescriptorImageInfos
 
vk::RenderPass renderPass
 
vk::CommandBuffer commandBuffer
 
vk::Semaphore imageAvailableSemaphore
 
vk::Semaphore renderFinishedSemaphore
 
vk::Fence renderFinishedFence
 
std::unique_ptr< pipeline_image::pipeline_imageimagePipeline
 
std::unique_ptr< pipeline_flat::pipeline_flatflatPipeline
 
std::unique_ptr< pipeline_box::pipeline_boxboxPipeline
 
std::unique_ptr< pipeline_SDF::pipeline_SDFSDFPipeline
 
std::unique_ptr< pipeline_tone_mapper::pipeline_tone_mappertoneMapperPipeline
 
- Data Fields inherited from tt::gfx_surface
gfx_systemsystem
 
gfx_surface_state state = gfx_surface_state::no_device
 
extent2 size
 The current size of the surface.
 
subpixel_orientation subpixel_orientation = subpixel_orientation::BlueRight
 

Static Public Attributes

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

Member Function Documentation

◆ init()

void tt::gfx_surface_vulkan::init ( )
overridevirtual

Reimplemented from tt::gfx_surface.

◆ render_finish()

void tt::gfx_surface_vulkan::render_finish ( draw_context const & context,
color background_color )
overridevirtual

Implements tt::gfx_surface.

◆ render_start()

std::optional< draw_context > tt::gfx_surface_vulkan::render_start ( aarectangle redraw_rectangle)
overridevirtual

Implements tt::gfx_surface.

◆ set_device()

void tt::gfx_surface_vulkan::set_device ( gfx_device * device)
overridevirtualnoexcept

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

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

Reimplemented from tt::gfx_surface.

◆ update()

extent2 tt::gfx_surface_vulkan::update ( extent2 minimum_size,
extent2 maximum_size )
overridevirtualnoexcept

Update the surface.

This function will check if the graphic pipeline and swapchain needs to be build, rebuild, or torn down.

Parameters
minimum_sizeThe minimum size that the surface is allowed to be.
maximum_sizeThe maximum size that the surface is allowed to be.

Implements tt::gfx_surface.


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