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

Helper structure to hold the data needed by one rendering context (Vulkan) of one OS window (Windows, Mac, or Linux). More...

#include <KarmaGuiVulkanHandler.h>

Collaboration diagram for Karma::KarmaGui_ImplVulkanH_Window:

Public Member Functions

 KarmaGui_ImplVulkanH_Window ()
 Constructor for zero clearence and relevant stuff.
 

Public Attributes

int Width
 Width dimension of the Window.
 
int Height
 Height dimension of the Window.
 
VkSwapchainKHR Swapchain
 Vulkan does not have the concept of a "default framebuffer", hence it requires an infrastructure that will own the buffers we will render to before we visualize them on the screen. This infrastructure is known as the swap chain and must be created explicitly in Vulkan. The swap chain is essentially a queue of images that are waiting to be presented to the screen. Our backend will acquire such an image to draw to it, and then return it to the queue. Taken from VulkanContext::CreateSwapChain().
 
VkCommandPool CommandPool
 Command pools manage the memory that is used to store the buffers and command buffers are allocated from them. Taken from VulkanContext::CreateCommandPool()
 
VkSurfaceKHR Surface
 The surface is a cross-platform abstraction over windows to render to and is generally instantiated by providing a reference to the native window handle.
 
VkSurfaceFormatKHR SurfaceFormat
 Structure describing a supported swapchain format-color space pair. Taken from VulkanContext::CreateSwapChain().
 
VkPresentModeKHR PresentMode
 Presentation mode supported for a surface. Taken from VulkanContext::CreateSwapChain().
 
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.
 
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.
 
bool ClearEnable
 No clue about the usage.
 
VkClearValue ClearValue
 VkClearValue structures containing clear values for each attachment, if the attachment uses a loadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR or if the attachment has a depth/stencil format and uses a stencilLoadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements of pClearValues are ignored.
 
uint32_t ImageFrameIndex
 The number count of the image, returned by vkGetSwapchainImagesKHR, usually range derived from min_image_count, to be addressed for frame (each loop iteration) rendering logic.
 
uint32_t TotalImageCount
 Total Number of the images supported by swapchain.
 
uint32_t SemaphoreIndex
 Current set of swapchain wait semaphores and command buffers we're using (0 <= SemaphoreIndex < MAX_FRAMES_IN_FLIGHT)
 
uint32_t MAX_FRAMES_IN_FLIGHT
 Is representative of (linearly proportional to or indicative of) number of commandbuffer recordings on CPU that may happen whilst the rendering is being done on GPU. That should determine the semaphore, fence, and commandbuffer size.
 
KarmaGui_ImplVulkanH_ImageFrameImageFrames
 Just a container for buffers and all those sizes depending on VulkanHolder::GetVulkanContext()->GetSwapChainImages().size();.
 
KarmaGui_Vulkan_Frame_On_FlightFramesOnFlight
 Data for synchronous operations of in-flight rendering frames.
 
VkRect2D RenderArea
 Most likely the glfw window size, set from VulkanHolder::GetVulkanContext()->GetSwapChainExtent(). Used for setting renderPassInfo.renderArea.extent in KarmaGuiRenderer::FrameRender.
 

Detailed Description

Helper structure to hold the data needed by one rendering context (Vulkan) of one OS window (Windows, Mac, or Linux).

Since
Karma 1.0.0

Constructor & Destructor Documentation

◆ KarmaGui_ImplVulkanH_Window()

Karma::KarmaGui_ImplVulkanH_Window::KarmaGui_ImplVulkanH_Window ( )
inline

Constructor for zero clearence and relevant stuff.

Since
Karma 1.0.0

Member Data Documentation

◆ ClearEnable

bool Karma::KarmaGui_ImplVulkanH_Window::ClearEnable

No clue about the usage.

Since
Karma 1.0.0

◆ ClearValue

VkClearValue Karma::KarmaGui_ImplVulkanH_Window::ClearValue

VkClearValue structures containing clear values for each attachment, if the attachment uses a loadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR or if the attachment has a depth/stencil format and uses a stencilLoadOp value of VK_ATTACHMENT_LOAD_OP_CLEAR. The array is indexed by attachment number. Only elements corresponding to cleared attachments are used. Other elements of pClearValues are ignored.

Since
Karma 1.0.0

◆ CommandPool

VkCommandPool Karma::KarmaGui_ImplVulkanH_Window::CommandPool

Command pools manage the memory that is used to store the buffers and command buffers are allocated from them. Taken from VulkanContext::CreateCommandPool()

Since
Karma 1.0.0

◆ FramesOnFlight

KarmaGui_Vulkan_Frame_On_Flight* Karma::KarmaGui_ImplVulkanH_Window::FramesOnFlight

Data for synchronous operations of in-flight rendering frames.

Since
Karma 1.0.0

◆ Height

int Karma::KarmaGui_ImplVulkanH_Window::Height

Height dimension of the Window.

Note
Used in KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_RenderWindow which is not used in current state of the Engine.
Since
Karma 1.0.0

◆ ImageFrameIndex

uint32_t Karma::KarmaGui_ImplVulkanH_Window::ImageFrameIndex

The number count of the image, returned by vkGetSwapchainImagesKHR, usually range derived from min_image_count, to be addressed for frame (each loop iteration) rendering logic.

Since
Karma 1.0.0

◆ ImageFrames

KarmaGui_ImplVulkanH_ImageFrame* Karma::KarmaGui_ImplVulkanH_Window::ImageFrames

Just a container for buffers and all those sizes depending on VulkanHolder::GetVulkanContext()->GetSwapChainImages().size();.

Since
Karma 1.0.0

◆ MAX_FRAMES_IN_FLIGHT

uint32_t Karma::KarmaGui_ImplVulkanH_Window::MAX_FRAMES_IN_FLIGHT

Is representative of (linearly proportional to or indicative of) number of commandbuffer recordings on CPU that may happen whilst the rendering is being done on GPU. That should determine the semaphore, fence, and commandbuffer size.

Since
Karma 1.0.0

◆ Pipeline

VkPipeline Karma::KarmaGui_ImplVulkanH_Window::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.

Note
The window pipeline may use a different VkRenderPass than the one passed in ImGui_ImplVulkan_InitInfo. Need to investigate why.
Since
Karma 1.0.0

◆ PresentMode

VkPresentModeKHR Karma::KarmaGui_ImplVulkanH_Window::PresentMode

Presentation mode supported for a surface. Taken from VulkanContext::CreateSwapChain().

Since
Karma 1.0.0

◆ RenderArea

VkRect2D Karma::KarmaGui_ImplVulkanH_Window::RenderArea

Most likely the glfw window size, set from VulkanHolder::GetVulkanContext()->GetSwapChainExtent(). Used for setting renderPassInfo.renderArea.extent in KarmaGuiRenderer::FrameRender.

Todo
Ponder, how to implement the context switch from Editor rendering to Game rendering.
Since
Karma 1.0.0

◆ RenderPass

VkRenderPass Karma::KarmaGui_ImplVulkanH_Window::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.

Since
Karma 1.0.0

◆ SemaphoreIndex

uint32_t Karma::KarmaGui_ImplVulkanH_Window::SemaphoreIndex

Current set of swapchain wait semaphores and command buffers we're using (0 <= SemaphoreIndex < MAX_FRAMES_IN_FLIGHT)

Since
Karma 1.0.0

◆ Surface

VkSurfaceKHR Karma::KarmaGui_ImplVulkanH_Window::Surface

The surface is a cross-platform abstraction over windows to render to and is generally instantiated by providing a reference to the native window handle.

Note
The vulkan backend, in current stance, is not using the surface created in VulkanContext::CreateSurface() since all the surface relevant operations have already been done in VulkanContext.
Since
Karma 1.0.0

◆ SurfaceFormat

VkSurfaceFormatKHR Karma::KarmaGui_ImplVulkanH_Window::SurfaceFormat

Structure describing a supported swapchain format-color space pair. Taken from VulkanContext::CreateSwapChain().

Since
Karma 1.0.0

◆ Swapchain

VkSwapchainKHR Karma::KarmaGui_ImplVulkanH_Window::Swapchain

Vulkan does not have the concept of a "default framebuffer", hence it requires an infrastructure that will own the buffers we will render to before we visualize them on the screen. This infrastructure is known as the swap chain and must be created explicitly in Vulkan. The swap chain is essentially a queue of images that are waiting to be presented to the screen. Our backend will acquire such an image to draw to it, and then return it to the queue. Taken from VulkanContext::CreateSwapChain().

Since
Karma 1.0.0

◆ TotalImageCount

uint32_t Karma::KarmaGui_ImplVulkanH_Window::TotalImageCount

Total Number of the images supported by swapchain.

Since
Karma 1.0.0

◆ Width

int Karma::KarmaGui_ImplVulkanH_Window::Width

Width dimension of the Window.

Note
Used in KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_RenderWindow which is not used in current state of the Engine.
Since
Karma 1.0.0

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