KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::KarmaGui_ImplVulkan_Data Struct Reference

Backend data containing stuff for Vulkan renderer for KarmaGui. More...

#include <KarmaGuiVulkanHandler.h>

Inheritance diagram for Karma::KarmaGui_ImplVulkan_Data:
Collaboration diagram for Karma::KarmaGui_ImplVulkan_Data:

Public Attributes

KarmaGui_ImplVulkan_InitInfo VulkanInitInfo
 KarmaGui's initialization data.
 
VkRenderPass RenderPass
 A render pass object represents a collection of attachments, subpasses, and dependencies between the subpasses, and describes how the attachments are used over the course of the subpasses.
 
VkDeviceSize BufferMemoryAlignment
 The value for default alignment for index and vertex buffers. The value is set to 256 by DearImgui authors, so we do in KarmaGuiRenderer::KarmaGui_ImplVulkan_Init.
 
VkPipelineCreateFlags PipelineCreateFlags
 Flags to be set for Vulkan's graphics pipeline.
 
VkDescriptorSetLayout DescriptorSetLayout
 A handle to the descriptorsetlayout created by backend in KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_CreateDescriptorSetLayout.
 
VkPipelineLayout PipelineLayout
 Opaque handle to a pipeline layout object. Access to descriptor sets from a pipeline is accomplished through a pipeline layout. Zero or more descriptor set layouts and zero or more push constant ranges are combined to form a pipeline layout object describing the complete set of resources that can be accessed by a pipeline. The pipeline layout represents a sequence of descriptor sets with each having a specific layout. This sequence of layouts is used to determine the interface between shader stages and shader resources. Each pipeline is created using a pipeline layout.
 
VkPipeline Pipeline
 A huge object in Vulkan that encompasses the configuration of the entire GPU for the draw. Once a pipeline is built, it can be bound inside a command buffer, and then when you draw anything it will use the bound pipeline.
 
uint32_t Subpass
 Not sure what the use of this Subpass is. Seems vestigial?
 
VkShaderModule ShaderModuleVert
 Opaque handle to a vertex shader module object for backend. Shader modules contain shader code and one or more entry points. Shaders are selected from a shader module by specifying an entry point as part of pipeline creation. The stages of a pipeline can use shaders that come from different modules. The shader code defining a shader module must be in the SPIR-V format, as described by the Vulkan Environment for SPIR-V appendix.
 
VkShaderModule ShaderModuleFrag
 Opaque handle to fragment shader module object for backend. Shader modules contain shader code and one or more entry points. Shaders are selected from a shader module by specifying an entry point as part of pipeline creation. The stages of a pipeline can use shaders that come from different modules. The shader code defining a shader module must be in the SPIR-V format, as described by the Vulkan Environment for SPIR-V appendix.
 
VkSampler FontSampler
 Opaque handle to a sampler object. The object represents the state of an image sampler which is used by the implementation to read image data and apply filtering and other transformations for the shader.
 
VkDeviceMemory FontMemory
 The memory resource allocated for the fonts to be displayed by the backend.
 
VkImage FontImage
 A 2D font image object with following properties.
 
VkImageView FontView
 The image view, for 2D font, representing contiguous ranges of the image subresources and containing additional metadata which are used by pipeline shaders for reading or writing image data.
 
VkDescriptorSet FontDescriptorSet
 Container for uploading image texture relevant data, TextureView for instance, from CPU to GPU.
 
VkDeviceMemory UploadBufferMemory
 Device allocated memory for font image pixels' buffer.
 
VkBuffer UploadBuffer
 Vulkan buffer containing font texture pixels.
 
std::vector< KarmaGui_ImplVulkan_Image_TextureData * > vulkanMesaDecalDataList
 List of vulkan images' textures, for instance icons and stuff.
 

Detailed Description

Backend data containing stuff for Vulkan renderer for KarmaGui.

The object is accessed by the acessor function KarmaGuiRenderer::GetBackendRendererUserData()

Note
This class is base for KarmaGuiBackendRendererUserData which is fat and needs rethinking from polymorphism pov. Hence also in todo list.
Todo
Ponder upon the fatness.
Since
Karma 1.0.0

Member Data Documentation

◆ BufferMemoryAlignment

VkDeviceSize Karma::KarmaGui_ImplVulkan_Data::BufferMemoryAlignment

The value for default alignment for index and vertex buffers. The value is set to 256 by DearImgui authors, so we do in KarmaGuiRenderer::KarmaGui_ImplVulkan_Init.

See also
See Align
Since
Karma 1.0.0

◆ DescriptorSetLayout

VkDescriptorSetLayout Karma::KarmaGui_ImplVulkan_Data::DescriptorSetLayout

A handle to the descriptorsetlayout created by backend in KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_CreateDescriptorSetLayout.

A descriptor set layout object is defined by an array of zero or more descriptor bindings. Each individual descriptor binding is specified by a descriptor type, a count (array size) of the number of descriptors in the binding, a set of shader stages that can access the binding, and (if using immutable samplers) an array of sampler descriptors.

In this backend context, the layout is created for fonts to be programmed? in fragment shader stage.

Since
Karma 1.0.0

◆ FontDescriptorSet

VkDescriptorSet Karma::KarmaGui_ImplVulkan_Data::FontDescriptorSet

Container for uploading image texture relevant data, TextureView for instance, from CPU to GPU.

Since
Karma 1.0.0

◆ FontImage

VkImage Karma::KarmaGui_ImplVulkan_Data::FontImage

A 2D font image object with following properties.

  1. VK_SHARING_MODE_EXCLUSIVE: specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time.
  2. VK_IMAGE_USAGE_TRANSFER_DST_BIT: specifies that the image can be used as the destination of a transfer command.
  3. VK_IMAGE_USAGE_SAMPLED_BIT: specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader.
  4. VK_IMAGE_TILING_OPTIMAL: specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more efficient memory access).
  5. VK_FORMAT_R8G8B8A8_UNORM specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.
Note
The image is going to be used as destination for the buffer copy, so it should be set up as a transfer destination VK_IMAGE_USAGE_TRANSFER_DST_BIT. We also want to be able to access the image from the shader to color our mesh, so the usage should include VK_IMAGE_USAGE_SAMPLED_BIT. Refer https://vulkan-tutorial.com/Texture_mapping/Images
Since
Karma 1.0.0

◆ FontMemory

VkDeviceMemory Karma::KarmaGui_ImplVulkan_Data::FontMemory

The memory resource allocated for the fonts to be displayed by the backend.

Since
Karma 1.0.0

◆ FontSampler

VkSampler Karma::KarmaGui_ImplVulkan_Data::FontSampler

Opaque handle to a sampler object. The object represents the state of an image sampler which is used by the implementation to read image data and apply filtering and other transformations for the shader.

Since
Karma 1.0.0

◆ FontView

VkImageView Karma::KarmaGui_ImplVulkan_Data::FontView

The image view, for 2D font, representing contiguous ranges of the image subresources and containing additional metadata which are used by pipeline shaders for reading or writing image data.

Since
Karma 1.0.0

◆ Pipeline

VkPipeline Karma::KarmaGui_ImplVulkan_Data::Pipeline

A huge object in Vulkan that encompasses the configuration of the entire GPU for the draw. Once a pipeline is built, it can be bound inside a command buffer, and then when you draw anything it will use the bound pipeline.

Since
Karma 1.0.0

◆ PipelineCreateFlags

VkPipelineCreateFlags Karma::KarmaGui_ImplVulkan_Data::PipelineCreateFlags

Flags to be set for Vulkan's graphics pipeline.

Since
Karma 1.0.0

◆ PipelineLayout

VkPipelineLayout Karma::KarmaGui_ImplVulkan_Data::PipelineLayout

Opaque handle to a pipeline layout object. Access to descriptor sets from a pipeline is accomplished through a pipeline layout. Zero or more descriptor set layouts and zero or more push constant ranges are combined to form a pipeline layout object describing the complete set of resources that can be accessed by a pipeline. The pipeline layout represents a sequence of descriptor sets with each having a specific layout. This sequence of layouts is used to determine the interface between shader stages and shader resources. Each pipeline is created using a pipeline layout.

See also
KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_CreatePipelineLayout
Since
Karma 1.0.0

◆ RenderPass

VkRenderPass Karma::KarmaGui_ImplVulkan_Data::RenderPass

A render pass object represents a collection of attachments, subpasses, and dependencies between the subpasses, and describes how the attachments are used over the course of the subpasses.

Set to KarmaGui_ImplVulkan_InitInfo.RenderPass in the function KarmaGuiRenderer::KarmaGui_ImplVulkan_Init

Since
Karma 1.0.0

◆ ShaderModuleFrag

VkShaderModule Karma::KarmaGui_ImplVulkan_Data::ShaderModuleFrag

Opaque handle to fragment shader module object for backend. Shader modules contain shader code and one or more entry points. Shaders are selected from a shader module by specifying an entry point as part of pipeline creation. The stages of a pipeline can use shaders that come from different modules. The shader code defining a shader module must be in the SPIR-V format, as described by the Vulkan Environment for SPIR-V appendix.

Since
Karma 1.0.0

◆ ShaderModuleVert

VkShaderModule Karma::KarmaGui_ImplVulkan_Data::ShaderModuleVert

Opaque handle to a vertex shader module object for backend. Shader modules contain shader code and one or more entry points. Shaders are selected from a shader module by specifying an entry point as part of pipeline creation. The stages of a pipeline can use shaders that come from different modules. The shader code defining a shader module must be in the SPIR-V format, as described by the Vulkan Environment for SPIR-V appendix.

Since
Karma 1.0.0

◆ Subpass

uint32_t Karma::KarmaGui_ImplVulkan_Data::Subpass

Not sure what the use of this Subpass is. Seems vestigial?

Since
Karma 1.0.0

◆ UploadBuffer

VkBuffer Karma::KarmaGui_ImplVulkan_Data::UploadBuffer

Vulkan buffer containing font texture pixels.

Since
Karma 1.0.0

◆ UploadBufferMemory

VkDeviceMemory Karma::KarmaGui_ImplVulkan_Data::UploadBufferMemory

Device allocated memory for font image pixels' buffer.

Since
Karma 1.0.0

◆ VulkanInitInfo

KarmaGui_ImplVulkan_InitInfo Karma::KarmaGui_ImplVulkan_Data::VulkanInitInfo

KarmaGui's initialization data.

Since
Karma 1.0.0

◆ vulkanMesaDecalDataList

std::vector<KarmaGui_ImplVulkan_Image_TextureData*> Karma::KarmaGui_ImplVulkan_Data::vulkanMesaDecalDataList

List of vulkan images' textures, for instance icons and stuff.

Since
Karma 1.0.0

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