Latest updates to Graphics, need to do test run
This commit is contained in:
parent
29e45ba113
commit
0ba290a385
14
DanBias.sln
14
DanBias.sln
|
@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkDependencies", "Netw
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameLogic", "GameLogic\GameLogic.vcxproj", "{B1195BB9-B3A5-47F0-906C-8DEA384D1520}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tester", "Tester\Tester.vcxproj", "{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
|
@ -161,10 +163,22 @@ Global
|
|||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.Build.0 = Debug|x64
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|Win32.Build.0 = Release|Win32
|
||||
{B1195BB9-B3A5-47F0-906C-8DEA384D1520}.Release|x64.ActiveCfg = Release|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Debug|x64.Build.0 = Debug|x64
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Release|Win32.Build.0 = Release|Win32
|
||||
{9C60E0F4-9DD5-48FC-A5A4-F3B0CC92367B}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -72,24 +72,20 @@ bool Oyster::Engine::Init::CreateSwapChain(HWND Window,int NrofBuffers,bool MSAA
|
|||
|
||||
bool Oyster::Engine::Init::FullInit(const Setup& setup)
|
||||
{
|
||||
if(!Oyster::Engine::Init::Instance(setup.Common.SingleThreaded,setup.Common.Reference,setup.Common.ForceDX11))
|
||||
if(!Oyster::Engine::Init::Instance(setup.SingleThreaded,setup.Reference,setup.ForceDX11))
|
||||
return false;
|
||||
if(setup.Window.InitWindow)
|
||||
if(!Oyster::Engine::Init::InitializeWindow(setup.Window.appname,setup.Window.classname,setup.Window.hinstance,setup.Window.nCmdShow,setup.Window.wProc, true))
|
||||
return false;
|
||||
if(!Oyster::Engine::Init::CreateSwapChain(NULL,setup.Common.NrOfBuffers,setup.Common.MSAA_Quality,setup.Common.Fullscreen))
|
||||
if(!Oyster::Engine::Init::CreateSwapChain(NULL,setup.NrOfBuffers,setup.MSAA_Quality,setup.Fullscreen))
|
||||
return false;
|
||||
if(!Oyster::Shader::InitShaders())
|
||||
return false;
|
||||
if(setup.Common.GenerateDepthStencil)
|
||||
if(!CreateDepthStencil(setup.Common.MSAA_Quality))
|
||||
/// \todo Add Init Shaders to full Init Process
|
||||
if(setup.GenerateDepthStencil)
|
||||
if(!CreateDepthStencil(setup.MSAA_Quality))
|
||||
return false;
|
||||
if(!CreateRenderTarget())
|
||||
return false;
|
||||
if(!Oyster::Render::Textbox::Init())
|
||||
return false;
|
||||
SetViewPort();
|
||||
if(setup.Common.BindDefault)
|
||||
if(setup.BindDefault)
|
||||
Oyster::Engine::PrepareForRendering::BindRenderTargets(&instance.rtv,1,instance.depth);
|
||||
|
||||
instance.States.NrOfSamples = 14;
|
||||
|
@ -152,14 +148,14 @@ void Oyster::Engine::PrepareForRendering::Begin2DRender()
|
|||
{
|
||||
Oyster::Resources::Buffers::V2DSprites.Apply();
|
||||
Oyster::Resources::Buffers::CBufferGs.Apply();
|
||||
Shader::SetShaderEffect(Oyster::Resources::ShaderEffects::BasicSprite);
|
||||
Core::ShaderManager::SetShaderEffect(Oyster::Resources::ShaderEffects::BasicSprite);
|
||||
}
|
||||
|
||||
void Oyster::Engine::PrepareForRendering::Begin2DTextRender()
|
||||
{
|
||||
Oyster::Render::Textbox::TextBuffer.Apply();
|
||||
Oyster::Resources::Buffers::CBufferGs.Apply();
|
||||
Oyster::Shader::SetShaderEffect(Oyster::Resources::ShaderEffects::Text2DEffect);
|
||||
Oyster::Core::ShaderManager::SetShaderEffect(Oyster::Resources::ShaderEffects::Text2DEffect);
|
||||
}
|
||||
|
||||
|
||||
|
@ -366,7 +362,7 @@ void Blur(int target)
|
|||
Oyster::Engine::PrepareForRendering::BindUAV(&Oyster::Resources::PipeLineResourses::TempUav,1);
|
||||
|
||||
//dispatch blurr horizontal
|
||||
Oyster::Shader::Set::SetCompute(Oyster::Shader::Get::GetCompute("BlurHorizontal"));
|
||||
Oyster::Core::ShaderManager::Set::Compute(Oyster::Core::ShaderManager::Get::Compute(L"BlurHorizontal"));
|
||||
Oyster::Core::DeviceContext->Dispatch(7,instance.sizeX,1);
|
||||
|
||||
//clean Pipeline
|
||||
|
@ -378,7 +374,7 @@ void Blur(int target)
|
|||
Oyster::Engine::PrepareForRendering::BindUAV(&Oyster::Resources::PipeLineResourses::LightTarget[target],1);
|
||||
|
||||
//dispatch blurr vertical
|
||||
Oyster::Shader::Set::SetCompute(Oyster::Shader::Get::GetCompute("BlurVertical"));
|
||||
Oyster::Core::ShaderManager::Set::Compute(Oyster::Core::ShaderManager::Get::Compute(L"BlurVertical"));
|
||||
Oyster::Core::DeviceContext->Dispatch(instance.sizeY,5,1);
|
||||
|
||||
//clean Pipeline
|
||||
|
@ -443,7 +439,7 @@ void Oyster::Engine::Pipeline::Deffered_Lightning::NewFrame(const Float4& col, c
|
|||
void Oyster::Engine::Pipeline::Deffered_Lightning::BeginRenderGeometry()
|
||||
{
|
||||
Oyster::Engine::PrepareForRendering::BindRenderTargets( Oyster::Resources::PipeLineResourses::GeometryTarget, 5 );
|
||||
Oyster::Shader::SetShaderEffect( Oyster::Resources::ShaderEffects::ModelEffect );
|
||||
Oyster::Core::ShaderManager::SetShaderEffect( Oyster::Resources::ShaderEffects::ModelEffect );
|
||||
}
|
||||
|
||||
void Oyster::Engine::Pipeline::Deffered_Lightning::RenderGeometry(const Oyster::Render::Model* models,int count)
|
||||
|
@ -472,7 +468,7 @@ void Oyster::Engine::Pipeline::Deffered_Lightning::RenderLightning()
|
|||
Oyster::Core::DeviceContext->CSSetShaderResources(0,5, Oyster::Resources::PipeLineResourses::GeometryOut);
|
||||
Oyster::Resources::Buffers::CBufferPipelineCs.Apply();
|
||||
Oyster::Core::DeviceContext->CSSetShaderResources( 6, 4, Oyster::Resources::PipeLineResourses::ComputeResources );
|
||||
Oyster::Shader::Set::SetCompute( Oyster::Shader::Get::GetCompute("Pass0") );
|
||||
Oyster::Core::ShaderManager::Set::Compute( Oyster::Core::ShaderManager::Get::Compute(L"Pass0") );
|
||||
|
||||
Oyster::Core::DeviceContext->Dispatch( 49, 36, 1 );
|
||||
|
||||
|
@ -490,7 +486,7 @@ void Oyster::Engine::Pipeline::Deffered_Lightning::RenderLightning()
|
|||
|
||||
//prepare and render final pass
|
||||
Oyster::Engine::PrepareForRendering::BindBackBufferAsUAV();
|
||||
Oyster::Shader::Set::SetCompute( Oyster::Shader::Get::GetCompute("Pass1") );
|
||||
Oyster::Core::ShaderManager::Set::Compute( Oyster::Core::ShaderManager::Get::Compute(L"Pass1") );
|
||||
Oyster::Core::DeviceContext->CSSetShaderResources( 0, 4, Oyster::Resources::PipeLineResourses::LightOut );
|
||||
|
||||
Oyster::Core::DeviceContext->Dispatch( 49, 36, 1 );
|
||||
|
|
|
@ -21,38 +21,25 @@ namespace Oyster
|
|||
public:
|
||||
struct Setup
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool InitWindow;
|
||||
LPCSTR appname;
|
||||
LPCSTR classname;
|
||||
HINSTANCE hinstance;
|
||||
int nCmdShow;
|
||||
WNDPROC wProc;
|
||||
bool ManageWindow;
|
||||
}Window;
|
||||
struct
|
||||
{
|
||||
int NrOfBuffers;
|
||||
bool MSAA_Quality;
|
||||
bool Fullscreen;
|
||||
bool SingleThreaded;
|
||||
bool Reference;
|
||||
bool ForceDX11;
|
||||
bool GenerateDepthStencil;
|
||||
bool BindDefault;
|
||||
}Common;
|
||||
int NrOfBuffers;
|
||||
bool MSAA_Quality;
|
||||
bool Fullscreen;
|
||||
bool SingleThreaded;
|
||||
bool Reference;
|
||||
bool ForceDX11;
|
||||
bool GenerateDepthStencil;
|
||||
bool BindDefault;
|
||||
//all but Window params have Default Values
|
||||
Setup()
|
||||
{
|
||||
Common.NrOfBuffers=1;
|
||||
Common.MSAA_Quality = false;
|
||||
Common.Fullscreen = true;
|
||||
Common.SingleThreaded = true;
|
||||
Common.Reference = false;
|
||||
Common.ForceDX11 = false;
|
||||
Common.GenerateDepthStencil = true;
|
||||
Common.BindDefault = true;
|
||||
NrOfBuffers=1;
|
||||
MSAA_Quality = false;
|
||||
Fullscreen = true;
|
||||
SingleThreaded = true;
|
||||
Reference = false;
|
||||
ForceDX11 = false;
|
||||
GenerateDepthStencil = true;
|
||||
BindDefault = true;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\OysterPhysics3D;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\OysterPhysic3D\Collision;..\OysterPhysics3D;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
|
|
@ -4,16 +4,16 @@ namespace Oyster
|
|||
{
|
||||
namespace Resources
|
||||
{
|
||||
Shader::ShaderEffect ShaderEffects::BasicSprite = Shader::ShaderEffect();
|
||||
Shader::ShaderEffect ShaderEffects::Text2DEffect = Shader::ShaderEffect();
|
||||
Shader::ShaderEffect ShaderEffects::ModelEffect = Shader::ShaderEffect();
|
||||
Core::ShaderManager::ShaderEffect ShaderEffects::BasicSprite = Core::ShaderManager::ShaderEffect();
|
||||
Core::ShaderManager::ShaderEffect ShaderEffects::Text2DEffect = Core::ShaderManager::ShaderEffect();
|
||||
Core::ShaderManager::ShaderEffect ShaderEffects::ModelEffect = Core::ShaderManager::ShaderEffect();
|
||||
|
||||
void ShaderEffects::Init()
|
||||
{
|
||||
BasicSprite.IAStage.Topology = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST;
|
||||
BasicSprite.Shaders.Vertex = Oyster::Shader::Get::GetVertex("2D");
|
||||
BasicSprite.Shaders.Geometry = Oyster::Shader::Get::GetGeometry("2D");
|
||||
BasicSprite.Shaders.Pixel = Oyster::Shader::Get::GetPixel("Texture0");
|
||||
BasicSprite.Shaders.Vertex = Oyster::Core::ShaderManager::Get::Vertex(L"2D");
|
||||
BasicSprite.Shaders.Geometry = Oyster::Core::ShaderManager::Get::Geometry(L"2D");
|
||||
BasicSprite.Shaders.Pixel = Oyster::Core::ShaderManager::Get::Pixel(L"Texture0");
|
||||
|
||||
D3D11_BLEND_DESC blendDesc;
|
||||
blendDesc.AlphaToCoverageEnable=false;
|
||||
|
@ -38,16 +38,16 @@ namespace Oyster
|
|||
|
||||
ID3D11InputLayout* layout;
|
||||
|
||||
Oyster::Shader::CreateInputLayout(SpriteVertexDesc,1,Oyster::Shader::Get::GetVertex("2D"),layout);
|
||||
Oyster::Core::ShaderManager::CreateInputLayout(SpriteVertexDesc,1,Oyster::Core::ShaderManager::Get::Vertex(L"2D"),layout);
|
||||
|
||||
BasicSprite.IAStage.Layout = layout;
|
||||
|
||||
Text2DEffect.IAStage.Topology=D3D11_PRIMITIVE_TOPOLOGY_POINTLIST;
|
||||
Text2DEffect.Shaders.Vertex = Oyster::Shader::Get::GetVertex("Text");
|
||||
Text2DEffect.Shaders.Geometry = Oyster::Shader::Get::GetGeometry("Text");
|
||||
Text2DEffect.Shaders.Pixel = Oyster::Shader::Get::GetPixel("Texture0");
|
||||
Text2DEffect.Shaders.Vertex = Oyster::Core::ShaderManager::Get::Vertex(L"Text");
|
||||
Text2DEffect.Shaders.Geometry = Oyster::Core::ShaderManager::Get::Geometry(L"Text");
|
||||
Text2DEffect.Shaders.Pixel = Oyster::Core::ShaderManager::Get::Pixel(L"Texture0");
|
||||
|
||||
Oyster::Shader::CreateInputLayout(Text2DDesc,3,Oyster::Shader::Get::GetVertex("Text"),layout);
|
||||
Oyster::Core::ShaderManager::CreateInputLayout(Text2DDesc,3,Oyster::Core::ShaderManager::Get::Vertex(L"Text"),layout);
|
||||
|
||||
Text2DEffect.IAStage.Layout = layout;
|
||||
|
||||
|
@ -56,11 +56,11 @@ namespace Oyster
|
|||
Text2DEffect.RenderStates.BlendState = blender;
|
||||
|
||||
ModelEffect.IAStage.Topology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST;
|
||||
Oyster::Shader::CreateInputLayout(ModelDesc,3,Oyster::Shader::Get::GetVertex("OBJ"),layout);
|
||||
Oyster::Core::ShaderManager::CreateInputLayout(ModelDesc,3,Oyster::Core::ShaderManager::Get::Vertex(L"OBJ"),layout);
|
||||
ModelEffect.IAStage.Layout = layout;
|
||||
|
||||
ModelEffect.Shaders.Vertex = Oyster::Shader::Get::GetVertex("OBJ");
|
||||
ModelEffect.Shaders.Pixel = Oyster::Shader::Get::GetPixel("OBJDEF");
|
||||
ModelEffect.Shaders.Vertex = Oyster::Core::ShaderManager::Get::Vertex(L"OBJ");
|
||||
ModelEffect.Shaders.Pixel = Oyster::Core::ShaderManager::Get::Pixel(L"OBJDEF");
|
||||
|
||||
Oyster::Buffer::BUFFER_INIT_DESC desc;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace Oyster
|
|||
{
|
||||
struct ShaderEffects
|
||||
{
|
||||
static Oyster::Shader::ShaderEffect BasicSprite;
|
||||
static Oyster::Shader::ShaderEffect Text2DEffect;
|
||||
static Oyster::Shader::ShaderEffect ModelEffect;
|
||||
static Oyster::Core::ShaderManager::ShaderEffect BasicSprite;
|
||||
static Oyster::Core::ShaderManager::ShaderEffect Text2DEffect;
|
||||
static Oyster::Core::ShaderManager::ShaderEffect ModelEffect;
|
||||
|
||||
static void Init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue