00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CEGUIDirect3D11TextureTarget_h_
00028 #define _CEGUIDirect3D11TextureTarget_h_
00029
00030 #include "CEGUIDirect3D11RenderTarget.h"
00031 #include "../../CEGUITextureTarget.h"
00032
00033 #if defined(_MSC_VER)
00034 # pragma warning(push)
00035 # pragma warning(disable : 4250)
00036 # pragma warning(disable : 4251)
00037 #endif
00038
00039
00040 struct ID3D11Texture2D;
00041 struct ID3D11RenderTargetView;
00042 struct ID3D11DepthStencilView;
00043
00044
00045 namespace CEGUI
00046 {
00047 class Direct3D11Texture;
00048
00050 class D3D11_GUIRENDERER_API Direct3D11TextureTarget : public Direct3D11RenderTarget,
00051 public TextureTarget
00052 {
00053 public:
00054 Direct3D11TextureTarget(Direct3D11Renderer& owner);
00055 virtual ~Direct3D11TextureTarget();
00056
00057
00058 void activate();
00059 void deactivate();
00060
00061 bool isImageryCache() const;
00062
00063 void clear();
00064 Texture& getTexture() const;
00065 void declareRenderSize(const Size& sz);
00066 bool isRenderingInverted() const;
00067
00068 protected:
00070 static const float DEFAULT_SIZE;
00071
00073 void initialiseRenderTexture();
00075 void cleanupRenderTexture();
00077 void resizeRenderTexture();
00079 void enableRenderTexture();
00081 void disableRenderTexture();
00082
00084 ID3D11Texture2D* d_texture;
00086 ID3D11RenderTargetView* d_renderTargetView;
00088 Direct3D11Texture* d_CEGUITexture;
00090 ID3D11RenderTargetView* d_previousRenderTargetView;
00092 ID3D11DepthStencilView* d_previousDepthStencilView;
00093 };
00094
00095 }
00096
00097 #if defined(_MSC_VER)
00098 # pragma warning(pop)
00099 #endif
00100
00101 #endif // end of guard _CEGUIDirect3D11TextureTarget_h_