Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
DeferredRenderPass.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Engine - Graphics module"
3 // For conditions of distribution and use, see copyright notice in Config.hpp
4 
5 #pragma once
6 
7 #ifndef NAZARA_DEFERREDRENDERPASS_HPP
8 #define NAZARA_DEFERREDRENDERPASS_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Graphics/Config.hpp>
12 #include <Nazara/Math/Vector2.hpp>
13 
14 namespace Nz
15 {
16  class DeferredRenderTechnique;
17  class DeferredRenderQueue;
18  struct SceneData;
19  class RenderTexture;
20  class Texture;
21 
22  class NAZARA_GRAPHICS_API DeferredRenderPass
23  {
25 
26  public:
28  DeferredRenderPass(const DeferredRenderPass&) = delete;
29  virtual ~DeferredRenderPass();
30 
31  void Enable(bool enable);
32 
33  virtual void Initialize(DeferredRenderTechnique* technique);
34 
35  bool IsEnabled() const;
36 
37  virtual bool Process(const SceneData& sceneData, unsigned int workTexture, unsigned int sceneTexture) const = 0;
38  virtual bool Resize(const Vector2ui& GBufferSize);
39 
40  DeferredRenderPass& operator=(const DeferredRenderPass&) = delete;
41 
42  protected:
43  Vector2ui m_dimensions;
44  DeferredRenderTechnique* m_deferredTechnique;
45  DeferredRenderQueue* m_renderQueue;
46  RenderTexture* m_GBufferRTT;
47  RenderTexture* m_workRTT;
48  Texture* m_depthStencilTexture;
49  Texture* m_GBuffer[4];
50  Texture* m_workTextures[2];
51 
52  private:
53  bool m_enabled;
54  };
55 }
56 
57 #endif // NAZARA_DEFERREDRENDERPASS_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Graphics class that represents the pass for rendering in deferred rendering.
Definition: DeferredRenderPass.hpp:22
Graphics class that represents the technique used in deferred rendering.
Definition: DeferredRenderTechnique.hpp:24
Graphics class that represents the rendering queue for deferred rendering.
Definition: DeferredRenderQueue.hpp:22