mirror of
https://github.com/barkeser2002/flower.git
synced 2026-09-25 18:56:16 +03:00
25 lines
500 B
C++
25 lines
500 B
C++
#pragma once
|
|
|
|
#include <util/framework.h>
|
|
#include <util/util.h>
|
|
#include <vulkan/vulkan.h>
|
|
#include <vk_mem_alloc.h>
|
|
|
|
namespace engine
|
|
{
|
|
class VulkanContext;
|
|
|
|
class ShaderCache final : NonCopyable
|
|
{
|
|
public:
|
|
void init(const VulkanContext* context);
|
|
VkShaderModule getShader(const std::string& path, bool reload);
|
|
void release();
|
|
|
|
private:
|
|
const VulkanContext* m_context;
|
|
std::unordered_map<std::string, VkShaderModule> m_moduleCache;
|
|
|
|
void releaseModule(VkShaderModule shader);
|
|
};
|
|
} |