Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
A helper class to store unique samplers. More...
#include <SamplerManager.h>
Classes | |
struct | SamplerDescEqual |
struct | SamplerDescHash |
Public Member Functions | |
CSamplerManager (CDevice *device) | |
~CSamplerManager () | |
VkSampler | GetOrCreateSampler (const Sampler::Desc &samplerDesc) |
Private Attributes | |
CDevice * | m_Device = nullptr |
std::unordered_map< Sampler::Desc, VkSampler, SamplerDescHash, SamplerDescEqual > | m_SamplerMap |
A helper class to store unique samplers.
The manager doesn't track usages of its samplers but keep them alive until its end. So before destroying the manager its owner should guarantee no usage.
Renderer::Backend::Vulkan::CSamplerManager::CSamplerManager | ( | CDevice * | device | ) |
Renderer::Backend::Vulkan::CSamplerManager::~CSamplerManager | ( | ) |
VkSampler Renderer::Backend::Vulkan::CSamplerManager::GetOrCreateSampler | ( | const Sampler::Desc & | samplerDesc | ) |
|
private |
|
private |