Ocular Engine
D3D11RenderTexture.hpp
1 
17 #pragma once
18 #ifndef __OCULAR_D3D11_RENDER_TEXTURE__H__
19 #define __OCULAR_D3D11_RENDER_TEXTURE__H__
20 
21 #include "Graphics/Texture/RenderTexture.hpp"
22 #include "D3D11Texture.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
42  {
43  public:
44 
49  D3D11RenderTexture(TextureDescriptor const& descriptor, ID3D11Device* device);
50 
58  D3D11RenderTexture(TextureDescriptor const& descriptor, ID3D11Device* device, IDXGISwapChain* swapchain);
59  virtual ~D3D11RenderTexture();
60 
64  ID3D11RenderTargetView* getD3DRenderTargetView();
65 
66  //------------------------------------------------------------
67  // Inherited Methods
68 
72  virtual void unload() override;
73 
78  virtual void apply() override;
79 
84  virtual void refresh() override;
85 
86  protected:
87 
88  bool createD3DResources();
89  bool createD3DRenderTarget();
90 
91  virtual bool createD3DTexture2D(TextureDescriptor const& descriptor) override;
92 
93  ID3D11RenderTargetView* m_D3DRenderTargetView;
94  IDXGISwapChain* m_D3DSwapChain;
95 
96  private:
97  };
98  }
102 }
107 //------------------------------------------------------------------------------------------
108 
109 #endif
ID3D11RenderTargetView * getD3DRenderTargetView()
Definition: D3D11RenderTexture.cpp:57
Definition: D3D11RenderTexture.hpp:41
A special texture that can be rendered directly to.
Definition: RenderTexture.hpp:41
virtual void refresh() override
Definition: D3D11RenderTexture.cpp:114
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: TextureDescriptor.hpp:45
virtual void unload() override
Definition: D3D11RenderTexture.cpp:62
Definition: D3D11Texture.hpp:42
IDXGISwapChain * m_D3DSwapChain
Optional for when creating as a backbuffer.
Definition: D3D11RenderTexture.hpp:94
virtual void apply() override
Definition: D3D11RenderTexture.cpp:85
D3D11RenderTexture(TextureDescriptor const &descriptor, ID3D11Device *device)
Definition: D3D11RenderTexture.cpp:31