HAL::CreateRenderTarget

HAL::CreateRenderTarget
virtual Render::RenderTarget* CreateRenderTarget(const D3D12_CPU_DESCRIPTOR_HANDLE& rtv, ID3D12Resource* renderTexture, D3D12_RESOURCE_STATES rtUsage, const D3D12_CPU_DESCRIPTOR_HANDLE& dsv, ID3D12Resource* depthTexture, D3D12_RESOURCE_STATES dsUsage);
virtual Render::RenderTarget* CreateRenderTarget(Render::Texture* texture, bool needsStencil);
Description

CreateRenderTarget creates a render target. Note that we cannot render to textures which have multiple HW representations.

Parameters
Parameters 
Description 
const D3D12_CPU_DESCRIPTOR_HANDLE& rtv 
Handle to the CPU descriptor. 
ID3D12Resource* renderTexture 
_nt_ 
D3D12_RESOURCE_STATES rtUsage 
_nt_ 
const D3D12_CPU_DESCRIPTOR_HANDLE& dsv 
Handle to the CPU descriptor. 
ID3D12Resource* depthTexture 
_nt_ 
D3D12_RESOURCE_STATES dsUsage 
_nt_ 
Render::Texture* texture 
The texture associated with the render target. 
bool needsStencil 
A value of true allocates an internal depth/stencil buffer. 
Return Value

Returns the created render target.