BRE12
BRE
ShaderManager
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
10
class
ShaderManager
{
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
:
27
using
ShaderBlobs
=
tbb::concurrent_unordered_set<ID3DBlob*>
;
28
static
ShaderBlobs
mShaderBlobs;
29
30
static
std::mutex mMutex;
31
};
32
33
}
34
BRE
Definition:
Camera.cpp:8
BRE::ShaderManager
Definition:
ShaderManager.h:10
tbb::interface5::concurrent_unordered_set
Definition:
concurrent_unordered_set.h:58
Generated by
1.8.12