Danbias/Code/OysterGraphics/Render/Resources.h

119 lines
2.8 KiB
C
Raw Normal View History

2014-02-07 15:52:07 +01:00
#pragma once
#include "../Core/Core.h"
2014-02-21 11:49:24 +01:00
#include "../Model/ModelInfo.h"
#include "../Definitions/GraphicalDefinition.h"
2014-02-07 15:52:07 +01:00
namespace Oyster
{
namespace Graphics
{
namespace Render
{
class Resources
{
public:
2014-02-21 11:49:24 +01:00
struct ModelDataWrapper
{
Definitions::RenderInstanceData* rid;
int Models;
};
static std::map<Model::ModelInfo*, ModelDataWrapper*> RenderData;
2014-02-07 15:52:07 +01:00
static const int GBufferSize = 3;
static const int LBufferSize = 3;
2014-02-27 09:04:12 +01:00
static const int MaxLightSize = 1024;
2014-02-07 15:52:07 +01:00
//! 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
{
2014-02-24 14:44:36 +01:00
static Core::PipelineManager::RenderPass AnimatedPass;
static Core::PipelineManager::RenderPass InstancedPass;
2014-02-07 15:52:07 +01:00
static Core::Buffer ModelData;
static Core::Buffer AnimationData;
2014-02-24 14:44:36 +01:00
static Core::Buffer InstancedData;
2014-02-07 15:52:07 +01:00
};
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;
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();
};
}
}
}