2014-02-07 15:52:07 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../Core/Core.h"
|
|
|
|
|
|
|
|
namespace Oyster
|
|
|
|
{
|
|
|
|
namespace Graphics
|
|
|
|
{
|
|
|
|
namespace Render
|
|
|
|
{
|
|
|
|
class Resources
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
static const int GBufferSize = 3;
|
|
|
|
static const int LBufferSize = 3;
|
|
|
|
static const int MaxLightSize = 100;
|
|
|
|
|
|
|
|
//! GBuffers
|
|
|
|
//! 0 = Diffuse + Glow
|
|
|
|
//! 1 = Normal + Spec
|
|
|
|
//! 2 = GUI
|
|
|
|
static ID3D11RenderTargetView* GBufferRTV[GBufferSize];
|
|
|
|
static ID3D11ShaderResourceView* GBufferSRV[GBufferSize];
|
|
|
|
|
|
|
|
//! LBuffer
|
|
|
|
//! 0 = Diffuse
|
|
|
|
//! 1 = Specular
|
|
|
|
//! 2 = SSAO
|
|
|
|
static ID3D11UnorderedAccessView* LBufferUAV[LBufferSize];
|
|
|
|
static ID3D11ShaderResourceView* LBufferSRV[LBufferSize];
|
|
|
|
|
2014-02-12 16:21:46 +01:00
|
|
|
|
|
|
|
static Core::Buffer Color;
|
|
|
|
|
2014-02-07 15:52:07 +01:00
|
|
|
|
|
|
|
struct RenderStates
|
|
|
|
{
|
|
|
|
static ID3D11RasterizerState* rs;
|
|
|
|
static ID3D11SamplerState** ss;
|
|
|
|
static ID3D11DepthStencilState* dsState;
|
2014-02-11 13:29:19 +01:00
|
|
|
static ID3D11BlendState* bs;
|
2014-02-07 15:52:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Gather
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass Pass;
|
|
|
|
static Core::Buffer ModelData;
|
|
|
|
static Core::Buffer AnimationData;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Light
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass Pass;
|
|
|
|
static Core::Buffer LightConstantsData;
|
|
|
|
static Core::Buffer PointLightsData;
|
|
|
|
static ID3D11ShaderResourceView* PointLightView;
|
|
|
|
|
|
|
|
static ID3D11ShaderResourceView* SSAOKernel;
|
|
|
|
static ID3D11ShaderResourceView* SSAORandom;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Gui
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass Pass;
|
|
|
|
static Core::Buffer Data;
|
2014-02-18 09:32:10 +01:00
|
|
|
static ID3D11DepthStencilView* depth;
|
2014-02-11 13:29:19 +01:00
|
|
|
struct Text
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass Pass;
|
|
|
|
static Core::Buffer Vertex;
|
|
|
|
static ID3D11ShaderResourceView* Font;
|
|
|
|
};
|
2014-02-07 15:52:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Blur
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass HorPass;
|
|
|
|
static Core::PipelineManager::RenderPass VertPass;
|
|
|
|
|
|
|
|
|
|
|
|
//Blur UAV and SRV
|
|
|
|
static ID3D11UnorderedAccessView* BufferUAV;
|
|
|
|
static ID3D11ShaderResourceView* BufferSRV;
|
2014-02-13 15:24:19 +01:00
|
|
|
|
|
|
|
static Core::Buffer Data;
|
2014-02-07 15:52:07 +01:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:51:35 +01:00
|
|
|
struct Post
|
|
|
|
{
|
|
|
|
static Core::PipelineManager::RenderPass Pass;
|
|
|
|
static Core::Buffer Data;
|
|
|
|
};
|
2014-02-07 15:52:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Core::Init::State Init();
|
|
|
|
static Core::Init::State InitShaders();
|
|
|
|
static Core::Init::State InitRenderStates();
|
|
|
|
static Core::Init::State InitBuffers();
|
|
|
|
static Core::Init::State InitViews();
|
|
|
|
static Core::Init::State InitPasses();
|
|
|
|
static void Clean();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|