HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
tt::PipelineImage::DeviceShared Struct Referencefinal

Public Member Functions

 DeviceShared (GUIDevice const &device)
 
 DeviceShared (DeviceShared const &)=delete
 
DeviceSharedoperator= (DeviceShared const &)=delete
 
 DeviceShared (DeviceShared &&)=delete
 
DeviceSharedoperator= (DeviceShared &&)=delete
 
void destroy (GUIDevice *vulkanDevice)
 
std::vector< PageallocatePages (int const nrPages) noexcept
 Allocate pages from the atlas.
 
void freePages (std::vector< Page > const &pages) noexcept
 Deallocate pages back to the atlas.
 
Image makeImage (ivec extent) noexcept
 Allocate an image in the atlas.
 
void drawInCommandBuffer (vk::CommandBuffer &commandBuffer)
 
tt::PixelMap< R16G16B16A16SFloatgetStagingPixelMap ()
 
void prepareAtlasForRendering ()
 

Static Public Member Functions

static ivec getAtlasPositionFromPage (Page page) noexcept
 

Data Fields

GUIDevice const & device
 
vk::ShaderModule vertexShaderModule
 
vk::ShaderModule fragmentShaderModule
 
std::vector< vk::PipelineShaderStageCreateInfo > shaderStages
 
TextureMap stagingTexture
 
std::vector< TextureMapatlasTextures
 
std::array< vk::DescriptorImageInfo, atlasMaximumNrImages > atlasDescriptorImageInfos
 
vk::Sampler atlasSampler
 
vk::DescriptorImageInfo atlasSamplerDescriptorImageInfo
 
std::vector< PageatlasFreePages
 

Static Public Attributes

static constexpr int atlasNrHorizontalPages = 16
 
static constexpr int atlasNrVerticalPages = 16
 
static constexpr int atlasImageWidth = atlasNrHorizontalPages * Page::widthIncludingBorder
 
static constexpr int atlasImageHeight = atlasNrVerticalPages * Page::heightIncludingBorder
 
static constexpr int atlasNrPagesPerImage = atlasNrHorizontalPages * atlasNrVerticalPages
 
static constexpr int atlasMaximumNrImages = 16
 
static constexpr int stagingImageWidth = 1024
 
static constexpr int stagingImageHeight = 1024
 

Member Function Documentation

◆ allocatePages()

std::vector< Page > tt::PipelineImage::DeviceShared::allocatePages ( int const nrPages)
noexcept

Allocate pages from the atlas.

◆ destroy()

void tt::PipelineImage::DeviceShared::destroy ( GUIDevice * vulkanDevice)

Deallocate vulkan resources. This is called in the destructor of GUIDevice_vulkan, therefor we can not use our std::weak_ptr<GUIDevice_vulkan> device.

◆ freePages()

void tt::PipelineImage::DeviceShared::freePages ( std::vector< Page > const & pages)
noexcept

Deallocate pages back to the atlas.

◆ getAtlasPositionFromPage()

static ivec tt::PipelineImage::DeviceShared::getAtlasPositionFromPage ( Page page)
inlinestaticnoexcept

Get the coordinate in the atlas from a page index.

Parameters
pagenumber in the atlas
Returns
x, y pixel coordinate in an atlasTexture and z the atlasTextureIndex.

◆ makeImage()

Image tt::PipelineImage::DeviceShared::makeImage ( ivec extent)
noexcept

Allocate an image in the atlas.

Parameters
extentof the image.

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