BRE12
EnvironmentLoader.h
1 #pragma once
2 
3 #include <Utils\DebugUtils.h>
4 
5 namespace YAML {
6  class Node;
7 }
8 
9 struct ID3D12Resource;
10 
11 namespace BRE {
12 class TextureLoader;
13 
15 public:
16  EnvironmentLoader(TextureLoader& textureLoader)
17  : mTextureLoader(textureLoader)
18  {}
19  EnvironmentLoader(const EnvironmentLoader&) = delete;
20  const EnvironmentLoader& operator=(const EnvironmentLoader&) = delete;
22  EnvironmentLoader& operator=(EnvironmentLoader&&) = delete;
23 
24  void LoadEnvironment(const YAML::Node& rootNode) noexcept;
25 
26  ID3D12Resource& GetSkyBoxTexture() const noexcept
27  {
28  BRE_ASSERT(mSkyBoxTexture != nullptr);
29  return *mSkyBoxTexture;
30  }
31 
32  ID3D12Resource& GetDiffuseIrradianceTexture() const noexcept
33  {
34  BRE_ASSERT(mDiffuseIrradianceTexture != nullptr);
35  return *mDiffuseIrradianceTexture;
36  }
37 
38  ID3D12Resource& GetSpecularPreConvolvedEnvironmentTexture() const noexcept
39  {
40  BRE_ASSERT(mSpecularPreConvolvedEnvironmentTexture != nullptr);
41  return *mSpecularPreConvolvedEnvironmentTexture;
42  }
43 
44 private:
45  void UpdateEnvironmentTexture(const std::string& environmentName,
46  const std::string& environmentTextureName) noexcept;
47 
48  TextureLoader& mTextureLoader;
49 
50  ID3D12Resource* mSkyBoxTexture{ nullptr };
51  ID3D12Resource* mDiffuseIrradianceTexture{ nullptr };
52  ID3D12Resource* mSpecularPreConvolvedEnvironmentTexture{ nullptr };
53 };
54 }
55 
Definition: Camera.cpp:8
Definition: EnvironmentLoader.h:14
Definition: TextureLoader.h:15
Definition: DrawableObjectLoader.h:10
Definition: node.h:29