KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
VulkanFramebuffer.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <vulkan/vulkan_core.h>
14#include "VulkanRenderPass.h"
15
16namespace Karma
17{
18 // Forward declaration
19 class FVulkanDevice;
21
23
30 {
31 public:
33 {
34 VkImage m_ColorRTImages[MaxSimultaneousRenderTargets];
35
36 VkDeviceMemory m_ColorRTDeviceMemory[MaxSimultaneousRenderTargets];
37 VkImageView m_ColorRTViews[MaxSimultaneousRenderTargets];
38
39 bool bSwapChainColorRenderTarget = false;
40 };
41
43 {
44 VkImage m_DepthRTImage;
45
46 VkDeviceMemory m_DepthRTDeviceMemory;
47 VkImageView m_DepthRTView;
48 };
49
55 std::vector<ColorRenderTarget> m_ColorRenderTargets;
56 uint32_t m_NumColorRenderTargets;
57
58 // Depth render target information
59 bool bDepthRenderTarget = false;
60 DepthRenderTarget m_DepthRenderTarget;
61 };
62
71 class FVulkanFramebuffer
72 {
73 public:
74 FVulkanFramebuffer(FVulkanDevice& Device, const FVulkanRenderTargetsInfo& InRTInfo, const FVulkanRenderTargetLayout& RTLayout, const FVulkanRenderPass& RenderPass, uint32_t SwapchainImageIndex);
75
76 VkFramebuffer GetHandle() const { return m_Framebuffer; }
77
78 ~FVulkanFramebuffer();
79
80 private:
81 class FVulkanDevice& m_Device;
82
83 VkFramebuffer m_Framebuffer;
84 VkRect2D m_RenderArea;
85
86 KarmaVector<VkImageView> m_ImageViews;
87 };
88}
Karma Engine Vulkan RHI Render Pass definitions.
Manages Vulkan device resources and operations.
Definition VulkanDevice.h:33
The actual Vulkan renderpass Engine class.
Definition VulkanRenderPass.h:591
Data structure for Vulkan's render targets (color buffers and depth buffer).
Definition VulkanRenderPass.h:535
May move to more abstract since any graphic api should use such render targets' information.
Definition VulkanFramebuffer.h:30
std::vector< ColorRenderTarget > m_ColorRenderTargets
Array of of color rendertargets for each swapchain image.
Definition VulkanFramebuffer.h:55
Karma's std::vector wrapper with additional functionalities.
Definition KarmaTypes.h:243