PeriDyno 1.0.0
Loading...
Searching...
No Matches
vks::UIOverlay Class Reference

#include <VulkanUIOverlay.h>

Collaboration diagram for vks::UIOverlay:

Classes

struct  PushConstBlock
 

Public Member Functions

 UIOverlay ()
 
 ~UIOverlay ()
 
void preparePipeline (const VkPipelineCache pipelineCache, const VkRenderPass renderPass)
 
void prepareResources ()
 
bool update ()
 
void draw (const VkCommandBuffer commandBuffer)
 
void resize (uint32_t width, uint32_t height)
 
void freeResources ()
 
bool header (const char *caption)
 
bool checkBox (const char *caption, bool *value)
 
bool checkBox (const char *caption, int32_t *value)
 
bool inputFloat (const char *caption, float *value, float step, uint32_t precision)
 
bool sliderFloat (const char *caption, float *value, float min, float max)
 
bool sliderInt (const char *caption, int32_t *value, int32_t min, int32_t max)
 
bool comboBox (const char *caption, int32_t *itemindex, std::vector< std::string > items)
 
bool button (const char *caption)
 
void text (const char *formatstr,...)
 

Public Attributes

VkSampleCountFlagBits rasterizationSamples = VK_SAMPLE_COUNT_1_BIT
 
uint32_t subpass = 0
 
std::shared_ptr< vks::BuffervertexBuffer
 
std::shared_ptr< vks::BufferindexBuffer
 
int32_t vertexCount = 0
 
int32_t indexCount = 0
 
std::vector< VkPipelineShaderStageCreateInfo > shaders
 
VkDescriptorPool descriptorPool
 
VkDescriptorSetLayout descriptorSetLayout
 
VkDescriptorSet descriptorSet
 
VkPipelineLayout pipelineLayout
 
VkPipeline pipeline
 
VkDeviceMemory fontMemory = VK_NULL_HANDLE
 
VkImage fontImage = VK_NULL_HANDLE
 
VkImageView fontView = VK_NULL_HANDLE
 
VkSampler sampler
 
struct vks::UIOverlay::PushConstBlock pushConstBlock
 
bool visible = true
 
bool updated = false
 
float scale = 1.0f
 

Protected Attributes

dyno::VkContextctx
 

Detailed Description

Definition at line 35 of file VulkanUIOverlay.h.

Constructor & Destructor Documentation

◆ UIOverlay()

vks::UIOverlay::UIOverlay ( )

Definition at line 15 of file VulkanUIOverlay.cpp.

Here is the call graph for this function:

◆ ~UIOverlay()

vks::UIOverlay::~UIOverlay ( )

Definition at line 59 of file VulkanUIOverlay.cpp.

Member Function Documentation

◆ button()

bool vks::UIOverlay::button ( const char * caption)

Definition at line 477 of file VulkanUIOverlay.cpp.

◆ checkBox() [1/2]

bool vks::UIOverlay::checkBox ( const char * caption,
bool * value )

Definition at line 424 of file VulkanUIOverlay.cpp.

◆ checkBox() [2/2]

bool vks::UIOverlay::checkBox ( const char * caption,
int32_t * value )

Definition at line 431 of file VulkanUIOverlay.cpp.

◆ comboBox()

bool vks::UIOverlay::comboBox ( const char * caption,
int32_t * itemindex,
std::vector< std::string > items )

Definition at line 461 of file VulkanUIOverlay.cpp.

◆ draw()

void vks::UIOverlay::draw ( const VkCommandBuffer commandBuffer)

Definition at line 356 of file VulkanUIOverlay.cpp.

◆ freeResources()

void vks::UIOverlay::freeResources ( )

Definition at line 404 of file VulkanUIOverlay.cpp.

◆ header()

bool vks::UIOverlay::header ( const char * caption)

Definition at line 419 of file VulkanUIOverlay.cpp.

◆ inputFloat()

bool vks::UIOverlay::inputFloat ( const char * caption,
float * value,
float step,
uint32_t precision )

Definition at line 440 of file VulkanUIOverlay.cpp.

◆ preparePipeline()

void vks::UIOverlay::preparePipeline ( const VkPipelineCache pipelineCache,
const VkRenderPass renderPass )

Prepare a separate pipeline for the UI overlay rendering decoupled from the main application

Definition at line 218 of file VulkanUIOverlay.cpp.

Here is the call graph for this function:

◆ prepareResources()

void vks::UIOverlay::prepareResources ( )

Prepare all vulkan resources required to render the UI overlay

Definition at line 62 of file VulkanUIOverlay.cpp.

Here is the call graph for this function:

◆ resize()

void vks::UIOverlay::resize ( uint32_t width,
uint32_t height )

Definition at line 398 of file VulkanUIOverlay.cpp.

◆ sliderFloat()

bool vks::UIOverlay::sliderFloat ( const char * caption,
float * value,
float min,
float max )

Definition at line 447 of file VulkanUIOverlay.cpp.

◆ sliderInt()

bool vks::UIOverlay::sliderInt ( const char * caption,
int32_t * value,
int32_t min,
int32_t max )

Definition at line 454 of file VulkanUIOverlay.cpp.

◆ text()

void vks::UIOverlay::text ( const char * formatstr,
... )

Definition at line 484 of file VulkanUIOverlay.cpp.

◆ update()

bool vks::UIOverlay::update ( )

Update vertex and index buffer containing the imGui elements when required

Definition at line 299 of file VulkanUIOverlay.cpp.

Member Data Documentation

◆ ctx

dyno::VkContext* vks::UIOverlay::ctx
protected

Definition at line 38 of file VulkanUIOverlay.h.

◆ descriptorPool

VkDescriptorPool vks::UIOverlay::descriptorPool

Definition at line 51 of file VulkanUIOverlay.h.

◆ descriptorSet

VkDescriptorSet vks::UIOverlay::descriptorSet

Definition at line 53 of file VulkanUIOverlay.h.

◆ descriptorSetLayout

VkDescriptorSetLayout vks::UIOverlay::descriptorSetLayout

Definition at line 52 of file VulkanUIOverlay.h.

◆ fontImage

VkImage vks::UIOverlay::fontImage = VK_NULL_HANDLE

Definition at line 58 of file VulkanUIOverlay.h.

◆ fontMemory

VkDeviceMemory vks::UIOverlay::fontMemory = VK_NULL_HANDLE

Definition at line 57 of file VulkanUIOverlay.h.

◆ fontView

VkImageView vks::UIOverlay::fontView = VK_NULL_HANDLE

Definition at line 59 of file VulkanUIOverlay.h.

◆ indexBuffer

std::shared_ptr<vks::Buffer> vks::UIOverlay::indexBuffer

Definition at line 45 of file VulkanUIOverlay.h.

◆ indexCount

int32_t vks::UIOverlay::indexCount = 0

Definition at line 47 of file VulkanUIOverlay.h.

◆ pipeline

VkPipeline vks::UIOverlay::pipeline

Definition at line 55 of file VulkanUIOverlay.h.

◆ pipelineLayout

VkPipelineLayout vks::UIOverlay::pipelineLayout

Definition at line 54 of file VulkanUIOverlay.h.

◆ pushConstBlock

struct vks::UIOverlay::PushConstBlock vks::UIOverlay::pushConstBlock

◆ rasterizationSamples

VkSampleCountFlagBits vks::UIOverlay::rasterizationSamples = VK_SAMPLE_COUNT_1_BIT

Definition at line 41 of file VulkanUIOverlay.h.

◆ sampler

VkSampler vks::UIOverlay::sampler

Definition at line 60 of file VulkanUIOverlay.h.

◆ scale

float vks::UIOverlay::scale = 1.0f

Definition at line 69 of file VulkanUIOverlay.h.

◆ shaders

std::vector<VkPipelineShaderStageCreateInfo> vks::UIOverlay::shaders

Definition at line 49 of file VulkanUIOverlay.h.

◆ subpass

uint32_t vks::UIOverlay::subpass = 0

Definition at line 42 of file VulkanUIOverlay.h.

◆ updated

bool vks::UIOverlay::updated = false

Definition at line 68 of file VulkanUIOverlay.h.

◆ vertexBuffer

std::shared_ptr<vks::Buffer> vks::UIOverlay::vertexBuffer

Definition at line 44 of file VulkanUIOverlay.h.

◆ vertexCount

int32_t vks::UIOverlay::vertexCount = 0

Definition at line 46 of file VulkanUIOverlay.h.

◆ visible

bool vks::UIOverlay::visible = true

Definition at line 67 of file VulkanUIOverlay.h.


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