| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

Public Member Functions | Private Attributes
Fling::FrameBuffer Class Reference

`#include <FrameBuffer.h>`

## Public Member Functions
| FrameBuffer (const VkDevice &t_Dev, INT32 t_Width=2048, INT32 t_Height=2048)
| ~FrameBuffer ()
void | SizeSize (INT32 w, INT32 h)
void | Release ()
VkSampler | GetSamplerHandle () const
VkFramebuffer | GetHandle () const
VkRenderPass | GetRenderPassHandle () const
VkResult | CreateRenderPass ()
| Create the default render pass of this frame buffer based on the given attachments it has. More...
VkResult | CreateSampler (VkFilter magFilter, VkFilter minFilter, VkSamplerAddressMode adressMode)
| Create a sampler for sampling from any frame buffer attachments. More...
UINT32 | AddAttachment (AttachmentCreateInfo t_CreateInfo)
FrameBufferAttachment * | GetAttachmentAtIndex (UINT32 t_Index)
| Get the frame buffer attachment at a given index. More...
INT32 | GetWidth () const
INT32 | GetHeight () const

## Private Attributes
INT32 | m_Width = 0
INT32 | m_Height = 0
VkFramebuffer | m_FrameBuffer = VK_NULL_HANDLE
VkRenderPass | m_RenderPass = VK_NULL_HANDLE
VkSampler | m_Sampler = VK_NULL_HANDLE
const VkDevice & | m_Device
std::vector< FrameBufferAttachment * > | m_Attachments

## Constructor & Destructor Documentation

## ◆ FrameBuffer()

Fling::FrameBuffer::FrameBuffer | ( | const VkDevice & | t_Dev,
|  | INT32 | t_Width = `2048`,
|  | INT32 | t_Height = `2048`
| ) |  |
| explicit

## ◆ ~FrameBuffer()

Fling::FrameBuffer::~FrameBuffer | ( |  | ) |

## Member Function Documentation

## ◆ AddAttachment()

UINT32 Fling::FrameBuffer::AddAttachment | ( | AttachmentCreateInfo | t_CreateInfo | ) |

Returns
  Index of the new attachment on the frame buffer

## ◆ CreateRenderPass()

VkResult Fling::FrameBuffer::CreateRenderPass | ( |  | ) |

Create the default render pass of this frame buffer based on the given attachments it has.

Should be called AFTER adding attachments for proper uses.

Returns
  VK_SUCESS if all resources have been created successfully

## ◆ CreateSampler()

VkResult Fling::FrameBuffer::CreateSampler | ( | VkFilter | magFilter,
|  | VkFilter | minFilter,
|  | VkSamplerAddressMode | adressMode
| ) |  |

Create a sampler for sampling from any frame buffer attachments.

Returns
  VkResult for sampler creation

## ◆ GetAttachmentAtIndex()

FrameBufferAttachment * Fling::FrameBuffer::GetAttachmentAtIndex | ( | UINT32 | t_Index | ) |

Get the frame buffer attachment at a given index.

Returns
  Nullptr if index is invalid

## ◆ GetHandle()

VkFramebuffer Fling::FrameBuffer::GetHandle | ( |  | ) | const
| inline

## ◆ GetHeight()

INT32 Fling::FrameBuffer::GetHeight | ( |  | ) | const
| inline

## ◆ GetRenderPassHandle()

VkRenderPass Fling::FrameBuffer::GetRenderPassHandle | ( |  | ) | const
| inline

## ◆ GetSamplerHandle()

VkSampler Fling::FrameBuffer::GetSamplerHandle | ( |  | ) | const
| inline

## ◆ GetWidth()

INT32 Fling::FrameBuffer::GetWidth | ( |  | ) | const
| inline

## ◆ Release()

void Fling::FrameBuffer::Release | ( |  | ) |

## ◆ SizeSize()

void Fling::FrameBuffer::SizeSize | ( | INT32 | w,
|  | INT32 | h
| ) |  |

## Field Documentation

## ◆ m_Attachments

std::vector<FrameBufferAttachment*> Fling::FrameBuffer::m_Attachments
| private

## ◆ m_Device

const VkDevice& Fling::FrameBuffer::m_Device
| private

## ◆ m_FrameBuffer

VkFramebuffer Fling::FrameBuffer::m_FrameBuffer = VK_NULL_HANDLE
| private

## ◆ m_Height

INT32 Fling::FrameBuffer::m_Height = 0
| private

## ◆ m_RenderPass

VkRenderPass Fling::FrameBuffer::m_RenderPass = VK_NULL_HANDLE
| private

## ◆ m_Sampler

VkSampler Fling::FrameBuffer::m_Sampler = VK_NULL_HANDLE
| private

## ◆ m_Width

INT32 Fling::FrameBuffer::m_Width = 0
| private

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

- FlingEngine/Graphics/inc/FrameBuffer.h
- FlingEngine/Graphics/src/FrameBuffer.cpp