BRE12
SettingsManager.h
1 #pragma once
2 
3 #include <cstdint>
4 #include <d3d12.h>
5 
6 namespace BRE {
8 public:
9  SettingsManager() = delete;
10  ~SettingsManager() = delete;
11  SettingsManager(const SettingsManager&) = delete;
12  const SettingsManager& operator=(const SettingsManager&) = delete;
13  SettingsManager(SettingsManager&&) = delete;
14  SettingsManager& operator=(SettingsManager&&) = delete;
15 
16  __forceinline static float AspectRatio() noexcept
17  {
18  return static_cast<float>(sWindowWidth) / sWindowHeight;
19  }
20 
21  static const bool sIsFullscreenWindow;
22  static const std::uint32_t sCpuProcessorCount;
23  static const std::uint32_t sSwapChainBufferCount{ 4U };
24  static const std::uint32_t sQueuedFrameCount{ sSwapChainBufferCount - 1U };
25  static const std::uint32_t sWindowWidth;
26  static const std::uint32_t sWindowHeight;
27 
28  // Final buffer render target
29  static const DXGI_FORMAT sFrameBufferRTFormat;
30  static const DXGI_FORMAT sFrameBufferFormat;
31 
32  // Color buffer used for intermediate computations (light pass, post processing passes, etc)
33  static const DXGI_FORMAT sColorBufferFormat;
34 
35  // Used when creating depth stencil buffer
36  static const DXGI_FORMAT sDepthStencilFormat;
37 
38  // Used when creating a view to depth stencil buffer
39  static const DXGI_FORMAT sDepthStencilViewFormat;
40 
41  // Used when creating a shader resource view to the depth stencil buffer
42  static const DXGI_FORMAT sDepthStencilSRVFormat;
43 
44  static const float sNearPlaneZ;
45  static const float sFarPlaneZ;
46  static const float sVerticalFieldOfView;
47 
48  static const D3D12_VIEWPORT sScreenViewport;
49  static const D3D12_RECT sScissorRect;
50 
51  // Used to update physics. If you
52  // want a fixed update time step, for example,
53  // 60 FPS, then you should store 1.0f / 60.0f here
54  static const float sSecondsPerFrame;
55 };
56 }
57 
58 
Definition: Camera.cpp:8
Definition: SettingsManager.h:7