BRE12
ShaderManager.h
1 #pragma once
2 
3 #include <d3d12.h>
4 #include <D3Dcommon.h>
5 #include <mutex>
6 #include <tbb\concurrent_unordered_set.h>
7 
8 namespace BRE {
9 // Too load/get shaders
11 public:
12  ShaderManager() = delete;
13  ~ShaderManager() = delete;
14  ShaderManager(const ShaderManager&) = delete;
15  const ShaderManager& operator=(const ShaderManager&) = delete;
16  ShaderManager(ShaderManager&&) = delete;
17  ShaderManager& operator=(ShaderManager&&) = delete;
18 
19  static void EraseAll() noexcept;
20 
21  // Preconditions:
22  // - "filename" must not be nullptr
23  static ID3DBlob& LoadShaderFileAndGetBlob(const char* filename) noexcept;
24  static D3D12_SHADER_BYTECODE LoadShaderFileAndGetBytecode(const char* filename) noexcept;
25 
26 private:
28  static ShaderBlobs mShaderBlobs;
29 
30  static std::mutex mMutex;
31 };
32 
33 }
34 
Definition: Camera.cpp:8
Definition: ShaderManager.h:10
Definition: concurrent_unordered_set.h:58