diff --git a/DanBias.sln b/DanBias.sln index 302ed386..af80c6a1 100644 --- a/DanBias.sln +++ b/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,11 +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|Mixed Platforms.Build.0 = 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 diff --git a/Network/NetworkDependencies/NetworkDependencies.vcxproj b/Network/NetworkDependencies/NetworkDependencies.vcxproj index 61e9a856..d75cedab 100644 --- a/Network/NetworkDependencies/NetworkDependencies.vcxproj +++ b/Network/NetworkDependencies/NetworkDependencies.vcxproj @@ -90,7 +90,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;%(AdditionalIncludeDirectories) true @@ -101,7 +101,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;%(AdditionalIncludeDirectories) true @@ -114,7 +114,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;%(AdditionalIncludeDirectories) true @@ -129,7 +129,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;%(AdditionalIncludeDirectories) true @@ -138,6 +138,34 @@ + + + + + + + + + + + + + + + + + + + {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} + + + {f10cbc03-9809-4cba-95d8-327c287b18ee} + true + true + true + false + false + diff --git a/Network/NetworkDependencies/NetworkDependencies.vcxproj.filters b/Network/NetworkDependencies/NetworkDependencies.vcxproj.filters index d7ef6a1a..55401224 100644 --- a/Network/NetworkDependencies/NetworkDependencies.vcxproj.filters +++ b/Network/NetworkDependencies/NetworkDependencies.vcxproj.filters @@ -14,4 +14,47 @@ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/Network/OysterNetworkClient/OysterNetworkClient.vcxproj b/Network/OysterNetworkClient/OysterNetworkClient.vcxproj index 0ab9d481..e51f38e2 100644 --- a/Network/OysterNetworkClient/OysterNetworkClient.vcxproj +++ b/Network/OysterNetworkClient/OysterNetworkClient.vcxproj @@ -90,7 +90,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -101,7 +101,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -114,7 +114,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -129,7 +129,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -148,6 +148,17 @@ + + + {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} + + + {f10cbc03-9809-4cba-95d8-327c287b18ee} + + + {c5aa09d0-6594-4cd3-bd92-1d380c7b3b50} + + diff --git a/Network/OysterNetworkServer/OysterNetworkServer.vcxproj b/Network/OysterNetworkServer/OysterNetworkServer.vcxproj index df7e2852..6be7bc04 100644 --- a/Network/OysterNetworkServer/OysterNetworkServer.vcxproj +++ b/Network/OysterNetworkServer/OysterNetworkServer.vcxproj @@ -90,7 +90,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -101,7 +101,7 @@ Level3 Disabled true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -114,7 +114,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -129,7 +129,7 @@ true true true - %(AdditionalIncludeDirectories) + ..\..\Misc;..\..\OysterMath;..\NetworkDependencies;%(AdditionalIncludeDirectories) true @@ -157,6 +157,17 @@ + + + {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} + + + {f10cbc03-9809-4cba-95d8-327c287b18ee} + + + {c5aa09d0-6594-4cd3-bd92-1d380c7b3b50} + + diff --git a/Network/OysterNetworkServer/ServerInclude.h b/Network/OysterNetworkServer/ServerInclude.h index 4a704c76..da89053b 100644 --- a/Network/OysterNetworkServer/ServerInclude.h +++ b/Network/OysterNetworkServer/ServerInclude.h @@ -12,7 +12,7 @@ #include #include #include "OysterMath.h" -#include "Session.h" +//#include "Session.h" #include "ServerTimer.h" using namespace Network; diff --git a/Network/OysterNetworkServer/SocketServer.h b/Network/OysterNetworkServer/SocketServer.h index 28c19058..67eac381 100644 --- a/Network/OysterNetworkServer/SocketServer.h +++ b/Network/OysterNetworkServer/SocketServer.h @@ -1,6 +1,6 @@ #include "Game.h" #include "Lobby.h" -void ControlPlayer( GameLogic::Player& p,const ClientToServerUpdateData &update); +//void ControlPlayer( GameLogic::Player& p,const ClientToServerUpdateData &update); const int NR_CONNECTTHREADS=1; const int NR_SIMULTCPCONNECTS=1; //threads can only take 1 argument @@ -60,7 +60,7 @@ private: int nrActiveSessions; std::vector sessionEvents; std::vector sessionEffects; - GameLogic::Session* session; + //GameLogic::Session* session; std::vector timer; int DEBUGCTR; std::vector updateCount; diff --git a/OysterGraphics/Engine.cpp b/OysterGraphics/Engine.cpp index bee1e63d..a05663fb 100644 --- a/OysterGraphics/Engine.cpp +++ b/OysterGraphics/Engine.cpp @@ -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 ); diff --git a/OysterGraphics/Engine.h b/OysterGraphics/Engine.h index a9ef953c..78f9d74b 100644 --- a/OysterGraphics/Engine.h +++ b/OysterGraphics/Engine.h @@ -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; } }; diff --git a/OysterGraphics/OysterGraphics.vcxproj b/OysterGraphics/OysterGraphics.vcxproj index 98523a93..149735e3 100644 --- a/OysterGraphics/OysterGraphics.vcxproj +++ b/OysterGraphics/OysterGraphics.vcxproj @@ -101,7 +101,7 @@ Level3 Disabled true - ..\OysterPhysics3D;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories) + ..\OysterPhysic3D\Collision;..\OysterPhysics3D;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories) true @@ -166,43 +166,6 @@ - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - true - - {2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee} diff --git a/OysterGraphics/OysterGraphics.vcxproj.filters b/OysterGraphics/OysterGraphics.vcxproj.filters index ba4429f5..398d6739 100644 --- a/OysterGraphics/OysterGraphics.vcxproj.filters +++ b/OysterGraphics/OysterGraphics.vcxproj.filters @@ -93,19 +93,4 @@ Header Files - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OysterGraphics/Resourses/ShaderEffects.cpp b/OysterGraphics/Resourses/ShaderEffects.cpp index 8e09956b..33de3c05 100644 --- a/OysterGraphics/Resourses/ShaderEffects.cpp +++ b/OysterGraphics/Resourses/ShaderEffects.cpp @@ -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; diff --git a/OysterGraphics/Resourses/ShaderEffects.h b/OysterGraphics/Resourses/ShaderEffects.h index 7377bb7f..766d63a9 100644 --- a/OysterGraphics/Resourses/ShaderEffects.h +++ b/OysterGraphics/Resourses/ShaderEffects.h @@ -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();