Torque3D Documentation / _generateds / gfxD3D11TextureArray.h

gfxD3D11TextureArray.h

Engine/source/gfx/D3D11/gfxD3D11TextureArray.h

More...

Classes:

Detailed Description

 1
 2#ifndef _GFXD3D11TEXTUREARRAY_H_
 3#define _GFXD3D11TEXTUREARRAY_H_
 4
 5#include <dxgiformat.h>
 6
 7
 8#include "gfx/gfxTextureArray.h"
 9#include "gfx/gfxTextureManager.h"
10#include "core/util/safeRelease.h"
11#include "gfxD3D11TextureManager.h"
12
13class GFXD3D11TextureArray : public GFXTextureArray
14{
15public:
16   GFXD3D11TextureArray()
17      : mSRView( NULL ),
18        mRTView( NULL ),
19        mDSView( NULL ),
20        mTextureArray( NULL )
21   {
22   }
23
24   ~GFXD3D11TextureArray() { Release();  };
25
26   void init();
27   void setToTexUnit(U32 tuNum) override;
28
29   void createResourceView(DXGI_FORMAT format, U32 numMipLevels, U32 usageFlags);
30
31   // GFXResource interface
32   void zombify() override;
33   void resurrect() override;
34   void Release() override;
35
36
37   ID3D11ShaderResourceView* getSRView();
38   ID3D11RenderTargetView* getRTView();
39   ID3D11DepthStencilView* getDSView();
40
41   ID3D11ShaderResourceView** getSRViewPtr();
42   ID3D11RenderTargetView** getRTViewPtr();
43   ID3D11DepthStencilView** getDSViewPtr();
44
45protected:
46   void _setTexture(const GFXTexHandle& texture, U32 slot) override;
47
48private:
49   ID3D11ShaderResourceView* mSRView; // for shader resource input
50   ID3D11RenderTargetView* mRTView; // for render targets
51   ID3D11DepthStencilView* mDSView; //render target view for depth stencil
52   ID3D11Texture2D* mTextureArray;
53   D3D11_TEXTURE2D_DESC mTextureArrayDesc;
54};
55
56
57#endif
58