Added KRSamplerManager::DEFAULT_CLAMPED_SAMPLER and DEFAULT_WRAPPING_SAMPLER

Added KRSamplerManager::init
This commit is contained in:
2022-08-25 00:00:55 -07:00
parent 191167f9d3
commit e318a5b4aa
4 changed files with 38 additions and 1 deletions

View File

@@ -63,9 +63,13 @@ class KRSamplerManager : public KRContextObject
public:
KRSamplerManager(KRContext& context);
virtual ~KRSamplerManager();
void init();
KRSampler* getSampler(const SamplerInfo& info);
void destroy();
KRSampler* DEFAULT_CLAMPED_SAMPLER;
KRSampler* DEFAULT_WRAPPING_SAMPLER;
private:
typedef std::unordered_map<SamplerInfo, KRSampler*, SamplerInfoHasher> SamplerMap;
SamplerMap m_samplers;