Finality Engine
Loading...
Searching...
No Matches
VKFramebuffer.h
Go to the documentation of this file.
1
6#pragma once
7#include <Core/Framebuffer.h>
8#include "VKCore.h"
9
10namespace FINALITY
11{
14 {
15 public:
16 VKFramebuffer(VkDevice device, VkPhysicalDevice physicalDevice, const FramebufferSpecification& spec);
17 virtual ~VKFramebuffer();
18
19 void Bind() override;
20 void Unbind() override;
21 void Resize(uint32_t width, uint32_t height) override;
22
23 const FramebufferSpecification& GetSpecification() const override { return m_Specification; }
24 void* GetColorAttachmentRendererID() const override { return (void*)m_ColorImageView; }
25
26 VkRenderPass GetVKRenderPass() const { return m_RenderPass; }
27 VkFramebuffer GetVKFramebuffer() const { return m_Framebuffer; }
28 VkImage GetVKColorImage() const { return m_ColorImage; }
29 VkSampler GetColorSampler() const { return m_ColorSampler; }
30
31 private:
32 void Invalidate(VkPhysicalDevice physicalDevice);
33 void CleanUp();
34 uint32_t FindMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter, VkMemoryPropertyFlags properties);
35
36 private:
37 VkDevice m_Device = VK_NULL_HANDLE;
38 FramebufferSpecification m_Specification;
39
40 VkImage m_ColorImage = VK_NULL_HANDLE;
41 VkDeviceMemory m_ColorImageMemory = VK_NULL_HANDLE;
42 VkImageView m_ColorImageView = VK_NULL_HANDLE;
43 VkSampler m_ColorSampler = VK_NULL_HANDLE;
44
45 VkImage m_DepthImage = VK_NULL_HANDLE;
46 VkDeviceMemory m_DepthImageMemory = VK_NULL_HANDLE;
47 VkImageView m_DepthImageView = VK_NULL_HANDLE;
48
49 VkRenderPass m_RenderPass = VK_NULL_HANDLE;
50 VkFramebuffer m_Framebuffer = VK_NULL_HANDLE;
51 };
52}
VkImage GetVKColorImage() const
void * GetColorAttachmentRendererID() const override
VkSampler GetColorSampler() const
VkFramebuffer GetVKFramebuffer() const
VkRenderPass GetVKRenderPass() const
void Bind() override
const FramebufferSpecification & GetSpecification() const override
void Unbind() override
void Resize(uint32_t width, uint32_t height) override
VKFramebuffer(VkDevice device, VkPhysicalDevice physicalDevice, const FramebufferSpecification &spec)