#ifndef GP1_DIRECTX_SHADOWMAPBUFFER_H #define GP1_DIRECTX_SHADOWMAPBUFFER_H #include #include #include "DepthBuffer.h" #include "SamplerState.h" class ShadowMapBuffer { public: ShadowMapBuffer(ID3D11Device *device, UINT width, UINT height); ~ShadowMapBuffer(); bool Initialize(); void SetRenderTarget(ID3D11DeviceContext *deviceContext); void ResetRenderTarget(ID3D11DeviceContext *deviceContext); ID3D11ShaderResourceView *GetShaderResourceView() const { return m_shaderResourceView; } ID3D11SamplerState *GetSamplerState() const { return m_samplerState.GetSamplerState(); } ID3D11DepthStencilView *GetDepthStencilView(); private: ID3D11Device *m_device; UINT m_width; UINT m_height; DepthBuffer m_depthBuffer; SamplerState m_samplerState; ID3D11ShaderResourceView *m_shaderResourceView; }; #endif //GP1_DIRECTX_SHADOWMAPBUFFER_H