Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Attributes
Fling::Multisampler Class Reference

A multi-sampler will allow us to enable MSAA. More...

#include <MultiSampler.h>

Public Member Functions

 Multisampler (LogicalDevice *t_Dev, VkSampleCountFlagBits t_SampleCount=VK_SAMPLE_COUNT_1_BIT)
 Creates a multi-sampler with the set sample count, but does not create it. More...
 
 Multisampler (VkExtent2D t_Extents, VkFormat t_Format, VkSampleCountFlagBits t_SampleCount=VK_SAMPLE_COUNT_1_BIT)
 Initializes and creates this multi-sampler. More...
 
 ~Multisampler ()
 
FORCEINLINE VkSampleCountFlagBits GetSampleCountFlagBits () const
 
FORCEINLINE const VkImageView & GetImageView () const
 
void Release ()
 Release the Image, Image memory, and Image view of this multi sampler. More...
 
void Create (VkExtent2D t_Extents, VkFormat t_Format)
 Create the image, image mem, and image view based on the m_SampleCountBits field. More...
 

Private Attributes

VkImage m_ColorImage = VK_NULL_HANDLE
 
VkDeviceMemory m_ColorImageMemory = VK_NULL_HANDLE
 
VkImageView m_ColorImageView = VK_NULL_HANDLE
 
VkSampleCountFlagBits m_SampleCountBits = VK_SAMPLE_COUNT_1_BIT
 The max sample count allowed on this device. More...
 
const LogicalDevicem_Device
 

Detailed Description

A multi-sampler will allow us to enable MSAA.

Should be recreated with the swap chain as it needs the most up to date extents

Constructor & Destructor Documentation

◆ Multisampler() [1/2]

Fling::Multisampler::Multisampler ( LogicalDevice t_Dev,
VkSampleCountFlagBits  t_SampleCount = VK_SAMPLE_COUNT_1_BIT 
)

Creates a multi-sampler with the set sample count, but does not create it.

◆ Multisampler() [2/2]

Fling::Multisampler::Multisampler ( VkExtent2D  t_Extents,
VkFormat  t_Format,
VkSampleCountFlagBits  t_SampleCount = VK_SAMPLE_COUNT_1_BIT 
)

Initializes and creates this multi-sampler.

Parameters
t_ExtentsThe extents of the current swap chain
t_FormatThe same image format as your swap chain

◆ ~Multisampler()

Fling::Multisampler::~Multisampler ( )

Member Function Documentation

◆ Create()

void Fling::Multisampler::Create ( VkExtent2D  t_Extents,
VkFormat  t_Format 
)

Create the image, image mem, and image view based on the m_SampleCountBits field.

◆ GetImageView()

FORCEINLINE const VkImageView& Fling::Multisampler::GetImageView ( ) const
inline

◆ GetSampleCountFlagBits()

FORCEINLINE VkSampleCountFlagBits Fling::Multisampler::GetSampleCountFlagBits ( ) const
inline

◆ Release()

void Fling::Multisampler::Release ( )

Release the Image, Image memory, and Image view of this multi sampler.

Field Documentation

◆ m_ColorImage

VkImage Fling::Multisampler::m_ColorImage = VK_NULL_HANDLE
private

◆ m_ColorImageMemory

VkDeviceMemory Fling::Multisampler::m_ColorImageMemory = VK_NULL_HANDLE
private

◆ m_ColorImageView

VkImageView Fling::Multisampler::m_ColorImageView = VK_NULL_HANDLE
private

◆ m_Device

const LogicalDevice* Fling::Multisampler::m_Device
private

◆ m_SampleCountBits

VkSampleCountFlagBits Fling::Multisampler::m_SampleCountBits = VK_SAMPLE_COUNT_1_BIT
private

The max sample count allowed on this device.

Calculated in PhysicalDevice ctor


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