00001 00002 // Copyright Florian Winter 2010 - 2010. 00003 // Distributed under the Boost Software License, Version 1.0. 00004 // (See accompanying file LICENSE_1_0.txt or copy at 00005 // http://www.boost.org/LICENSE_1_0.txt) 00006 00013 #ifndef TK11_TARGET_HPP 00014 #define TK11_TARGET_HPP 00015 00016 #include "d3d.hpp" 00017 00018 namespace tk11 { 00019 00021 00025 class D3D11_Depth_Stencil_View_Desc : public D3D11_DEPTH_STENCIL_VIEW_DESC { 00026 public: 00028 00034 D3D11_Depth_Stencil_View_Desc(); 00035 }; 00036 00037 00039 00051 ID3D11RenderTargetView_ptr create_render_target_view(ID3D11Device_ptr device, ID3D11Texture2D_ptr texture); 00052 00054 00066 ID3D11DepthStencilView_ptr create_depth_stencil_view(ID3D11Device_ptr device, 00067 ID3D11Texture2D_ptr texture); 00068 00070 00083 ID3D11DepthStencilView_ptr create_depth_stencil_view(ID3D11Device_ptr device, 00084 ID3D11Texture2D_ptr texture, const D3D11_DEPTH_STENCIL_VIEW_DESC& desc); 00085 00087 00101 ID3D11DepthStencilView_ptr create_depth_stencil_view_2d( 00102 ID3D11Device_ptr device, unsigned int width, unsigned int height, 00103 DXGI_FORMAT format = DXGI_FORMAT_D32_FLOAT); 00104 00105 00107 00114 class Render_Target_Binding { 00115 public: 00117 00124 Render_Target_Binding(ID3D11DeviceContext_ptr context, 00125 ID3D11RenderTargetView_ptr render_target, 00126 ID3D11DepthStencilView_ptr depth_stencil = 0); 00127 00129 00132 ~Render_Target_Binding(); 00133 00134 private: 00136 ID3D11DeviceContext_ptr context; 00137 }; 00138 00139 } 00140 00141 #endif