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

MultiSampler.h
Go to the documentation of this file.
1 #pragma once
2
3 #include "FlingVulkan.h"
4 #include "Platform.h" // for FORCEINLINE
5
6 namespace Fling
7 {
8 class LogicalDevice;
9
14 class Multisampler
15 {
16 public:
17
21 Multisampler(LogicalDevice* t_Dev, VkSampleCountFlagBits t_SampleCount = VK_SAMPLE_COUNT_1_BIT);
22
28 Multisampler(VkExtent2D t_Extents, VkFormat t_Format, VkSampleCountFlagBits t_SampleCount = VK_SAMPLE_COUNT_1_BIT);
29
30 ~Multisampler();
31
32 FORCEINLINE VkSampleCountFlagBits GetSampleCountFlagBits() const { return m_SampleCountBits; }
33 FORCEINLINE const VkImageView& GetImageView() const { return m_ColorImageView; }
34
36 void Release();
37
39 void Create(VkExtent2D t_Extents, VkFormat t_Format);
40
41 private:
42 VkImage m_ColorImage = VK_NULL_HANDLE;
43 VkDeviceMemory m_ColorImageMemory = VK_NULL_HANDLE;
44 VkImageView m_ColorImageView = VK_NULL_HANDLE;
45
47 VkSampleCountFlagBits m_SampleCountBits = VK_SAMPLE_COUNT_1_BIT;
48 const LogicalDevice* m_Device;
49 };
50 } // namespace Fling
FlingVulkan.h
Fling::Multisampler::Create
void Create(VkExtent2D t_Extents, VkFormat t_Format)
Create the image, image mem, and image view based on the m_SampleCountBits field. ...
Definition: MultiSampler.cpp:20
Fling::Multisampler::m_ColorImageView
VkImageView m_ColorImageView
Definition: MultiSampler.h:44
Fling::Multisampler::m_SampleCountBits
VkSampleCountFlagBits m_SampleCountBits
The max sample count allowed on this device.
Definition: MultiSampler.h:47
Fling::Multisampler::Release
void Release()
Release the Image, Image memory, and Image view of this multi sampler.
Definition: MultiSampler.cpp:56
Fling::Multisampler::m_ColorImage
VkImage m_ColorImage
Definition: MultiSampler.h:42
Fling::LogicalDevice
A logical device represents the application view of the device.
Definition: LogicalDevice.h:13
Fling::Multisampler
A multi-sampler will allow us to enable MSAA.
Definition: MultiSampler.h:14
Fling::Multisampler::GetSampleCountFlagBits
FORCEINLINE VkSampleCountFlagBits GetSampleCountFlagBits() const
Definition: MultiSampler.h:32
Fling::Multisampler::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.
Definition: MultiSampler.cpp:8
Fling::Multisampler::m_Device
const LogicalDevice * m_Device
Definition: MultiSampler.h:48
Fling::Multisampler::m_ColorImageMemory
VkDeviceMemory m_ColorImageMemory
Definition: MultiSampler.h:43
Fling
Definition: Engine.h:29
Fling::Multisampler::~Multisampler
~Multisampler()
Definition: MultiSampler.cpp:78
Fling::Multisampler::GetImageView
FORCEINLINE const VkImageView & GetImageView() const
Definition: MultiSampler.h:33
Platform.h