Kale
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | List of all members
Kale::Vulkan::FrameBuffer Class Reference

#include <FrameBuffer.hpp>

+ Inheritance diagram for Kale::Vulkan::FrameBuffer:

Public Member Functions

 FrameBuffer ()
 
 FrameBuffer (Renderer &renderer, const Vector2ui32 &size)
 
void init (Renderer &renderer, const Vector2ui32 &size)
 
void freeResources ()
 
- Public Member Functions inherited from Kale::Vulkan::ParentResource< FrameBuffer >
virtual ~ParentResource ()
 
void freeChildren ()
 

Public Attributes

DeviceMemory imageMemory
 
vk::UniqueImage image
 
vk::UniqueImageView imageView
 
vk::UniqueFramebuffer framebuffer
 

Protected Member Functions

void freeResources (bool remove) override
 
- Protected Member Functions inherited from Kale::Vulkan::ChildResource< Renderer >
 ChildResource ()
 
 ChildResource (Renderer &parent)
 
virtual void init (Renderer &parent)
 
 ~ChildResource ()
 

Private Member Functions

void createFrameBuffer (const vk::UniqueImageView &imageView, const vk::Extent2D &extent, const vk::UniqueRenderPass &renderPass)
 

Additional Inherited Members

- Protected Attributes inherited from Kale::Vulkan::ParentResource< FrameBuffer >
std::list< ChildResource< FrameBuffer > * > resources
 
- Protected Attributes inherited from Kale::Vulkan::ChildResource< Renderer >
RendererparentPtr
 

Detailed Description

Represents a single framebuffer for offscreen rendering, NOT directly to the swapchain. To render to the swapchain use the swapchain's framebuffers instead

Definition at line 35 of file FrameBuffer.hpp.

Constructor & Destructor Documentation

◆ FrameBuffer() [1/2]

FrameBuffer::FrameBuffer ( )

Creates an uninstantiated FrameBuffer

Definition at line 36 of file FrameBuffer.cpp.

◆ FrameBuffer() [2/2]

FrameBuffer::FrameBuffer ( Renderer & renderer,
const Vector2ui32 & size )

Creates an initialized FrameBuffer

Parameters
rendererThe renderer this frame buffer will be rendered from

Definition at line 44 of file FrameBuffer.cpp.

Member Function Documentation

◆ createFrameBuffer()

void FrameBuffer::createFrameBuffer ( const vk::UniqueImageView & imageView,
const vk::Extent2D & extent,
const vk::UniqueRenderPass & renderPass )
private

Creates the frame buffer object

Parameters
imageViewthe image view to create the framebuffer from
extentThe extent of the image view to use
renderPassThe render pass which will be rendering to this frame buffer

Definition at line 96 of file FrameBuffer.cpp.

◆ freeResources() [1/2]

void FrameBuffer::freeResources ( )

Frees resources if not already freed Frees BOTH the imageview/image, and framebuffer

Definition at line 117 of file FrameBuffer.cpp.

◆ freeResources() [2/2]

void FrameBuffer::freeResources ( bool remove)
overrideprotectedvirtual

Frees resources if not already freed ONLY frees the frame buffer itself, not the image view or image

Frees resources if not already freed

Reimplemented from Kale::Vulkan::ChildResource< Renderer >.

Definition at line 107 of file FrameBuffer.cpp.

◆ init()

void FrameBuffer::init ( Renderer & renderer,
const Vector2ui32 & size )

Initializes the object

Parameters
rendererThe renderer this frame buffer will be rendered from

Definition at line 71 of file FrameBuffer.cpp.

Member Data Documentation

◆ framebuffer

vk::UniqueFramebuffer Kale::Vulkan::FrameBuffer::framebuffer

The frame buffer object

Definition at line 75 of file FrameBuffer.hpp.

◆ image

vk::UniqueImage Kale::Vulkan::FrameBuffer::image

The image

Definition at line 65 of file FrameBuffer.hpp.

◆ imageMemory

DeviceMemory Kale::Vulkan::FrameBuffer::imageMemory

The actual memory on the device storing the image

Definition at line 60 of file FrameBuffer.hpp.

◆ imageView

vk::UniqueImageView Kale::Vulkan::FrameBuffer::imageView

The image view

Definition at line 70 of file FrameBuffer.hpp.


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