Merge remote-tracking branch 'origin/Graphics' into GameLogicBranch

This commit is contained in:
Linda Andersson 2013-11-21 10:04:47 +01:00
commit 2c395807cd
3 changed files with 25 additions and 28 deletions

View File

@ -8,21 +8,14 @@ namespace Oyster
{
namespace Preparations
{
void Basic::BindBackBufferRTV(bool DepthStencil)
void Basic::BindBackBufferRTV()
{
if(DepthStencil)
{
Core::deviceContext->OMSetRenderTargets(1,&Core::backBufferRTV,Core::depthStencil);
}
else
{
Core::deviceContext->OMSetRenderTargets(1,&Core::backBufferRTV,NULL);
}
BindBackBufferRTV(Core::depthStencil);
}
void Basic::BindBackBufferRTV(ID3D11DepthStencilView& depthStencil)
void Basic::BindBackBufferRTV(ID3D11DepthStencilView* depthStencil)
{
Core::deviceContext->OMSetRenderTargets(1,&Core::backBufferRTV,&depthStencil);
Core::deviceContext->OMSetRenderTargets(1,&Core::backBufferRTV,depthStencil);
}
void Basic::BindBackBufferUAV()
@ -38,13 +31,13 @@ namespace Oyster
}
else
{
Core::deviceContext->OMSetRenderTargets(size,RTVs,NULL);
BindRTV(RTVs, size, nullptr);
}
}
void Basic::BindRTV(ID3D11RenderTargetView* RTVs[], int size,ID3D11DepthStencilView& depthStencil)
void Basic::BindRTV(ID3D11RenderTargetView* RTVs[], int size,ID3D11DepthStencilView* depthStencil)
{
Core::deviceContext->OMSetRenderTargets(size,RTVs,&depthStencil);
Core::deviceContext->OMSetRenderTargets(size,RTVs,depthStencil);
}
void Basic::BindUAV(ID3D11UnorderedAccessView* UAVs[], int size)
@ -52,13 +45,10 @@ namespace Oyster
Core::deviceContext->CSSetUnorderedAccessViews(0,size,UAVs,0);
}
void Basic::ClearBackBuffer(Oyster::Math::Float4 Color, bool ClearDefaultDepthStencil)
void Basic::ClearBackBuffer(Oyster::Math::Float4 Color)
{
Core::deviceContext->ClearRenderTargetView(Core::backBufferRTV,Color);
if(ClearDefaultDepthStencil)
{
Core::deviceContext->ClearDepthStencilView(Core::depthStencil,1,1,0);
}
ClearRTV(&Core::backBufferRTV, 1,Color);
ClearDepthStencil(Core::depthStencil);
}
void Basic::ClearRTV(ID3D11RenderTargetView* RTVs[], int size,Oyster::Math::Float4 Color)
@ -69,9 +59,9 @@ namespace Oyster
}
}
void Basic::ClearDepthStencil(ID3D11DepthStencilView &depthStencil)
void Basic::ClearDepthStencil(ID3D11DepthStencilView* depthStencil)
{
Core::deviceContext->ClearDepthStencilView(&depthStencil,1,1,0);
Core::deviceContext->ClearDepthStencilView(depthStencil,1,1,0);
}
void Basic::SetViewPort()

View File

@ -13,10 +13,13 @@ namespace Oyster
static class Basic
{
public:
/// @brief Binds the backbuffer as a RenderTargetView with or without the default DepthStencil
//! Binds the backbuffer as a RenderTargetView with or without the default DepthStencil
static void BindBackBufferRTV();
/** @brief Binds the backbuffer as a RenderTargetView with the specified DepthStencil*/
static void BindBackBufferRTV(ID3D11DepthStencilView& depthStencil);
/** @brief Binds the backbuffer as a RenderTargetView with or without the default DepthStencil*/
static void BindBackBufferRTV(bool UseDefaultDepthStencil = true);
static void BindBackBufferRTV(ID3D11DepthStencilView* depthStencil);
/** @brief Binds the backbuffer as a UnorderedAccessView*/
@ -25,18 +28,18 @@ namespace Oyster
/** @brief Binds the specified RenderTargetViews with or without the default DepthStencil*/
static void BindRTV(ID3D11RenderTargetView* RTVs[], int size, bool UseDepthStencil = true);
/** @brief Binds the specified RenderTargetViews with the specified DepthStencil*/
static void BindRTV(ID3D11RenderTargetView* RTVs[], int size,ID3D11DepthStencilView& depthStencil);
static void BindRTV(ID3D11RenderTargetView* RTVs[], int size,ID3D11DepthStencilView* depthStencil);
/** @brief Binds the specified UnorderedAccessViews*/
static void BindUAV(ID3D11UnorderedAccessView* UAVs[], int size);
/** @brief Clear the BackBuffer and if true the default DepthStencil*/
static void ClearBackBuffer(Oyster::Math::Float4 Color, bool ClearDefaultDepthStencil = true);
static void ClearBackBuffer(Oyster::Math::Float4 Color);
/** @brief Clear the specified RenderTargetViews*/
static void ClearRTV(ID3D11RenderTargetView* RTVs[], int size,Oyster::Math::Float4 Color);
/** @brief Clear the specified DepthStencil*/
static void ClearDepthStencil(ID3D11DepthStencilView &depthStencil);
static void ClearDepthStencil(ID3D11DepthStencilView* depthStencil);
/** @brief Binds the default ViewPort*/
static void SetViewPort();

View File

@ -41,10 +41,14 @@ namespace Oyster
/** @todo Create DX States */
#pragma endregion
#pragma region Setup Views
/** @todo Create Views */
#pragma endregion
#pragma region Create Shader Effects
/** @todo Create ShaderEffects */
#pragma endregion
return Core::Init::Sucsess;
}
}