diff --git a/Bin/Content/Shaders/DebugCameraVertex.cso b/Bin/Content/Shaders/DebugCameraVertex.cso deleted file mode 100644 index 20c23e0c..00000000 Binary files a/Bin/Content/Shaders/DebugCameraVertex.cso and /dev/null differ diff --git a/Bin/Content/Shaders/DebugPixel.cso b/Bin/Content/Shaders/DebugPixel.cso deleted file mode 100644 index da6e4513..00000000 Binary files a/Bin/Content/Shaders/DebugPixel.cso and /dev/null differ diff --git a/Bin/Content/Shaders/DebugVertex.cso b/Bin/Content/Shaders/DebugVertex.cso deleted file mode 100644 index e35466e1..00000000 Binary files a/Bin/Content/Shaders/DebugVertex.cso and /dev/null differ diff --git a/Bin/Content/Shaders/LightPass.cso b/Bin/Content/Shaders/LightPass.cso deleted file mode 100644 index c5573288..00000000 Binary files a/Bin/Content/Shaders/LightPass.cso and /dev/null differ diff --git a/Bin/Content/Shaders/PixelGatherData.cso b/Bin/Content/Shaders/PixelGatherData.cso deleted file mode 100644 index 70eba698..00000000 Binary files a/Bin/Content/Shaders/PixelGatherData.cso and /dev/null differ diff --git a/Bin/Content/Shaders/TextureDebug.cso b/Bin/Content/Shaders/TextureDebug.cso deleted file mode 100644 index 51c99d22..00000000 Binary files a/Bin/Content/Shaders/TextureDebug.cso and /dev/null differ diff --git a/Bin/Content/Shaders/VertexGatherData.cso b/Bin/Content/Shaders/VertexGatherData.cso deleted file mode 100644 index e105bdbc..00000000 Binary files a/Bin/Content/Shaders/VertexGatherData.cso and /dev/null differ diff --git a/Bin/Content/crate.obj b/Bin/Content/crate.obj new file mode 100644 index 00000000..027fd2cd --- /dev/null +++ b/Bin/Content/crate.obj @@ -0,0 +1,233 @@ +# This file uses centimeters as units for non-parametric coordinates. + +mtllib crate.mtl +g default +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 -0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.479379 0.522314 0.479379 +v 0.479379 0.522314 0.479379 +v 0.479379 0.522314 -0.479379 +v -0.479379 0.522314 -0.479379 +v -0.470939 -0.528599 -0.470939 +v 0.470939 -0.528599 -0.470939 +v 0.470939 -0.528599 0.470939 +v -0.470939 -0.528599 0.470939 +v 0.520103 -0.460610 -0.460610 +v 0.520103 -0.460610 0.460610 +v 0.520103 0.460610 -0.460610 +v 0.520103 0.460610 0.460610 +v -0.522559 -0.464751 -0.464751 +v -0.522559 -0.464751 0.464751 +v -0.522559 0.464751 0.464751 +v -0.522559 0.464751 -0.464751 +v -0.460954 -0.460954 0.522335 +v 0.460954 -0.460954 0.522335 +v 0.460954 0.460954 0.522335 +v -0.460954 0.460954 0.522335 +v -0.466507 0.466507 -0.525017 +v 0.466507 0.466507 -0.525017 +v 0.466507 -0.466507 -0.525017 +v -0.466507 -0.466507 -0.525017 +vt 0.995838 0.004695 +vt 0.999640 -0.003712 +vt 0.003809 -0.000160 +vt -0.000796 1.000526 +vt 0.003809 0.003892 +vt 0.999640 0.995671 +vt 0.003809 0.007944 +vt 0.999640 0.999723 +vt 0.003809 1.003774 +vt 0.999640 1.003774 +vt 0.995035 0.004695 +vt 0.995035 1.000526 +vt 0.000007 0.004695 +vt 0.000007 1.000526 +vt 0.999640 0.007944 +vt -0.000796 0.004695 +vt 0.003809 0.999723 +vt 0.003809 -0.003712 +vt 0.999640 0.003892 +vt 0.003809 0.995671 +vt 0.999640 0.992119 +vt 0.999640 -0.000160 +vt 0.003809 0.992119 +vt 0.995838 1.000526 +vt 0.003809 -0.003712 +vt 0.999640 -0.003712 +vt 0.999640 0.992119 +vt 0.003809 0.992119 +vt 0.003809 -0.000160 +vt 0.999640 -0.000160 +vt 0.999640 0.995671 +vt 0.003809 0.995671 +vt 0.003809 0.003892 +vt 0.999640 0.003892 +vt 0.999640 0.999723 +vt 0.003809 0.999723 +vt 0.003809 0.007944 +vt 0.999640 0.007944 +vt 0.999640 1.003774 +vt 0.003809 1.003774 +vt -0.000796 0.004695 +vt 0.995035 0.004695 +vt 0.995035 1.000526 +vt -0.000796 1.000526 +vt 0.000007 0.004695 +vt 0.995838 0.004695 +vt 0.995838 1.000526 +vt 0.000007 1.000526 +vt 0.003809 -0.000160 +vt 0.999640 -0.000160 +vt 0.999640 0.995671 +vt 0.003809 0.995671 +vt 0.003809 0.007944 +vt 0.999640 0.007944 +vt 0.999640 1.003774 +vt 0.003809 1.003774 +vt -0.000796 0.004695 +vt 0.995035 0.004695 +vt 0.995035 1.000526 +vt -0.000796 1.000526 +vt 0.000007 0.004695 +vt 0.995838 0.004695 +vt 0.995838 1.000526 +vt 0.000007 1.000526 +vt 0.003809 -0.003712 +vt 0.999640 -0.003712 +vt 0.999640 0.992119 +vt 0.003809 0.992119 +vt 0.003809 0.003892 +vt 0.999640 0.003892 +vt 0.999640 0.999723 +vt 0.003809 0.999723 +vn -0.031209 -0.033799 0.998941 +vn 0.033799 -0.031209 0.998941 +vn -0.033799 0.031209 0.998941 +vn 0.031209 0.033799 0.998941 +vn -0.030245 0.999045 0.031527 +vn 0.031527 0.999045 0.030245 +vn -0.031527 0.999045 -0.030245 +vn 0.030245 0.999045 -0.031527 +vn -0.034614 0.037052 -0.998714 +vn 0.037051 0.034614 -0.998714 +vn -0.037051 -0.034614 -0.998714 +vn 0.034614 -0.037052 -0.998714 +vn -0.038824 -0.998397 -0.041174 +vn 0.041174 -0.998397 -0.038824 +vn -0.041174 -0.998397 0.038824 +vn 0.038824 -0.998397 0.041174 +vn 0.999134 -0.030589 0.028224 +vn 0.999134 -0.028224 -0.030589 +vn 0.999134 0.028224 0.030589 +vn 0.999134 0.030589 -0.028224 +vn -0.998933 -0.033811 -0.031470 +vn -0.998933 -0.031470 0.033811 +vn -0.998933 0.031470 -0.033811 +vn -0.998933 0.033811 0.031470 +vn 0.577350 0.577350 -0.577350 +vn 0.577350 -0.577350 -0.577350 +vn -0.577350 0.577350 -0.577350 +vn -0.577350 -0.577350 -0.577350 +vn 0.577350 -0.577350 0.577350 +vn -0.577350 -0.577350 0.577350 +vn 0.577350 0.577350 0.577350 +vn -0.577350 0.577350 0.577350 +vn -0.608285 0.469952 0.639637 +vn 0.633500 0.454555 0.626145 +vn 0.657522 0.474071 -0.585595 +vn -0.626276 0.491669 -0.605013 +vn -0.608373 -0.534484 -0.586694 +vn 0.635292 -0.520408 -0.570596 +vn 0.616200 -0.500955 0.607735 +vn -0.589957 -0.516183 0.620891 +s 1 +g meshCrate +usemtl matCrateSG +f 33/65/1 34/66/2 36/68/3 +f 36/68/3 34/66/2 35/67/4 +f 17/49/5 18/50/6 20/52/7 +f 20/52/7 18/50/6 19/51/8 +f 37/69/9 38/70/10 40/72/11 +f 40/72/11 38/70/10 39/71/12 +f 21/53/13 22/54/14 24/56/15 +f 24/56/15 22/54/14 23/55/16 +f 26/57/17 25/58/18 28/60/19 +f 28/60/19 25/58/18 27/59/20 +f 29/61/21 30/62/22 32/64/23 +f 32/64/23 30/62/22 31/63/24 +s 7 +f 1/25/25 3/28/26 2/26/27 +f 2/26/27 3/28/26 4/27/28 +f 3/29/26 5/32/29 4/30/28 +f 4/30/28 5/32/29 6/31/30 +f 5/33/29 7/36/31 6/34/30 +f 6/34/30 7/36/31 8/35/32 +f 7/37/31 1/40/25 8/38/32 +f 8/38/32 1/40/25 2/39/27 +f 2/41/27 4/44/28 8/42/32 +f 8/42/32 4/44/28 6/43/30 +f 7/45/31 5/48/29 1/46/25 +f 1/46/25 5/48/29 3/47/26 +s 1 +f 12/3/33 11/22/34 17/49/5 +f 17/49/5 11/22/34 18/50/6 +f 11/22/34 13/6/35 18/50/6 +f 18/50/6 13/6/35 19/51/8 +f 13/6/35 14/20/36 19/51/8 +f 19/51/8 14/20/36 20/52/7 +f 14/20/36 12/3/33 20/52/7 +f 20/52/7 12/3/33 17/49/5 +f 16/7/37 15/15/38 21/53/13 +f 21/53/13 15/15/38 22/54/14 +f 15/15/38 10/10/39 22/54/14 +f 22/54/14 10/10/39 23/55/16 +f 10/10/39 9/9/40 23/55/16 +f 23/55/16 9/9/40 24/56/15 +f 9/9/40 16/7/37 24/56/15 +f 24/56/15 16/7/37 21/53/13 +f 10/16/39 15/11/38 26/57/17 +f 26/57/17 15/11/38 25/58/18 +f 15/11/38 13/12/35 25/58/18 +f 25/58/18 13/12/35 27/59/20 +f 13/12/35 11/4/34 27/59/20 +f 27/59/20 11/4/34 28/60/19 +f 11/4/34 10/16/39 28/60/19 +f 28/60/19 10/16/39 26/57/17 +f 16/13/37 9/1/40 29/61/21 +f 29/61/21 9/1/40 30/62/22 +f 9/1/40 12/24/33 30/62/22 +f 30/62/22 12/24/33 31/63/24 +f 12/24/33 14/14/36 31/63/24 +f 31/63/24 14/14/36 32/64/23 +f 14/14/36 16/13/37 32/64/23 +f 32/64/23 16/13/37 29/61/21 +f 9/18/40 10/2/39 33/65/1 +f 33/65/1 10/2/39 34/66/2 +f 10/2/39 11/21/34 34/66/2 +f 34/66/2 11/21/34 35/67/4 +f 11/21/34 12/23/33 35/67/4 +f 35/67/4 12/23/33 36/68/3 +f 12/23/33 9/18/40 36/68/3 +f 36/68/3 9/18/40 33/65/1 +f 14/5/36 13/19/35 37/69/9 +f 37/69/9 13/19/35 38/70/10 +f 13/19/35 15/8/38 38/70/10 +f 38/70/10 15/8/38 39/71/12 +f 15/8/38 16/17/37 39/71/12 +f 39/71/12 16/17/37 40/72/11 +f 16/17/37 14/5/36 40/72/11 +f 40/72/11 14/5/36 37/69/9 diff --git a/Bin/Content/tex_crate.png b/Bin/Content/tex_crate.png new file mode 100644 index 00000000..a7b0b1ef Binary files /dev/null and b/Bin/Content/tex_crate.png differ diff --git a/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp b/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp index 11144244..025be43f 100644 --- a/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp +++ b/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp @@ -175,7 +175,7 @@ namespace DanBias { inputObj->Update(); DanBias::Client::GameClientState::ClientState state = DanBias::Client::GameClientState::ClientState_Same; - state = m_data->gameClientState->Update(); + state = m_data->gameClientState->Update(deltaTime, inputObj); if(state != Client::GameClientState::ClientState_Same) { @@ -221,6 +221,8 @@ namespace DanBias HRESULT DanBiasGame::CleanUp() { + delete m_data->gameClientState; + delete m_data; return S_OK; } diff --git a/Code/Game/DanBiasGame/GameClientState/GameClientState.h b/Code/Game/DanBiasGame/GameClientState/GameClientState.h index 879dbafc..3df91311 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameClientState.h +++ b/Code/Game/DanBiasGame/GameClientState/GameClientState.h @@ -1,4 +1,7 @@ #pragma once +#define NOMINMAX +#include "L_inputClass.h" + namespace DanBias { namespace Client @@ -18,7 +21,7 @@ public: GameClientState(void); virtual ~GameClientState(void); virtual bool Init() = 0; - virtual ClientState Update() = 0; + virtual ClientState Update(float deltaTime, InputClass* KeyInput) = 0; virtual bool Render() = 0; virtual bool Release() = 0; }; diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.cpp b/Code/Game/DanBiasGame/GameClientState/GameState.cpp index b6951cd0..a1df56f8 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameState.cpp +++ b/Code/Game/DanBiasGame/GameClientState/GameState.cpp @@ -1,6 +1,15 @@ #include "GameState.h" #include "DllInterfaces/GFXAPI.h" using namespace DanBias::Client; + +struct GameState::myData +{ + myData(){} + Oyster::Math3D::Float4x4 view; + Oyster::Math3D::Float4x4 proj; + Oyster::Graphics::Model::Model *model; +}privData; + GameState::GameState(void) { } @@ -11,16 +20,33 @@ GameState::~GameState(void) } bool GameState::Init() { + // load models + privData = new myData(); + privData->model = Oyster::Graphics::API::CreateModel(L"crate"); + + privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000); + Oyster::Graphics::API::SetProjection(privData->proj); + + privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),Oyster::Math::Float3(0,0,5.4f)); + privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view); + return true; } -GameClientState::ClientState GameState::Update() +GameClientState::ClientState GameState::Update(float deltaTime, InputClass* KeyInput) { + if(KeyInput->IsKeyPressed(DIK_L)) + return ClientState_Lobby; + + // send key input to server. return ClientState_Same; } bool GameState::Render() { - Oyster::Graphics::API::NewFrame(Oyster::Math3D::Float4x4::null, Oyster::Math3D::Float4x4::null); + Oyster::Graphics::API::SetView(privData->view); + Oyster::Graphics::API::SetProjection( privData->proj); + Oyster::Graphics::API::NewFrame(); + //Oyster::Graphics::API::RenderModel(*(privData->model)); Oyster::Graphics::API::EndFrame(); return true; } diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.h b/Code/Game/DanBiasGame/GameClientState/GameState.h index 45011ba6..315dd6e8 100644 --- a/Code/Game/DanBiasGame/GameClientState/GameState.h +++ b/Code/Game/DanBiasGame/GameClientState/GameState.h @@ -6,11 +6,14 @@ namespace Client { class GameState : public GameClientState { +private: + struct myData; + myData* privData; public: GameState(void); ~GameState(void); bool Init(); - GameClientState::ClientState Update(); + GameClientState::ClientState Update(float deltaTime, InputClass* KeyInput); bool Render(); bool Release(); }; diff --git a/Code/Game/DanBiasGame/GameClientState/LobbyState.cpp b/Code/Game/DanBiasGame/GameClientState/LobbyState.cpp index 2ccba307..b52e9b6d 100644 --- a/Code/Game/DanBiasGame/GameClientState/LobbyState.cpp +++ b/Code/Game/DanBiasGame/GameClientState/LobbyState.cpp @@ -3,12 +3,13 @@ #include "OysterMath.h" using namespace DanBias::Client; -struct myData +struct LobbyState::myData { + myData(){} Oyster::Math3D::Float4x4 view; Oyster::Math3D::Float4x4 proj; Oyster::Graphics::Model::Model *model; -}data; +}privData; LobbyState::LobbyState(void) @@ -19,29 +20,40 @@ LobbyState::LobbyState(void) LobbyState::~LobbyState(void) { + Oyster::Graphics::API::DeleteModel(privData->model); + Oyster::Graphics::API::Clean(); } bool LobbyState::Init() { - data.model = Oyster::Graphics::API::CreateModel(L"crate"); + // load models + privData = new myData(); + privData->model = Oyster::Graphics::API::CreateModel(L"crate"); + + privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000); + //privData->proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 1000); + Oyster::Graphics::API::SetProjection(privData->proj); + + privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),Oyster::Math::Float3(0,0,5.4f)); + privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view); + + - Oyster::Math::Float3 dir = Oyster::Math::Float3(0,0,-1); - Oyster::Math::Float3 up =Oyster::Math::Float3(0,1,0); - Oyster::Math::Float3 pos = Oyster::Math::Float3(0, 0, 100); - data.view = Oyster::Math3D::ViewMatrix_LookAtDirection(dir, up, pos); - data.proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 10); return true; } -GameClientState::ClientState LobbyState::Update() +GameClientState::ClientState LobbyState::Update(float deltaTime, InputClass* KeyInput) { - //if( startGame) - // return ClientState_Game; + if( KeyInput->IsKeyPressed(DIK_Q)) + return ClientState_Game; return ClientState_Same; } bool LobbyState::Render() { - Oyster::Graphics::API::NewFrame(data.view, data.proj); - Oyster::Graphics::API::RenderScene(data.model,1); + + Oyster::Graphics::API::SetView(privData->view); + Oyster::Graphics::API::SetProjection( privData->proj); + Oyster::Graphics::API::NewFrame(); + Oyster::Graphics::API::RenderModel(*(privData->model)); Oyster::Graphics::API::EndFrame(); return true; } diff --git a/Code/Game/DanBiasGame/GameClientState/LobbyState.h b/Code/Game/DanBiasGame/GameClientState/LobbyState.h index 04e1ca8b..8002238e 100644 --- a/Code/Game/DanBiasGame/GameClientState/LobbyState.h +++ b/Code/Game/DanBiasGame/GameClientState/LobbyState.h @@ -4,16 +4,17 @@ namespace DanBias { namespace Client { - struct myData; + class LobbyState : public GameClientState { private: + struct myData; myData* privData; public: LobbyState(void); ~LobbyState(void); bool Init(); - ClientState Update(); + ClientState Update(float deltaTime, InputClass* KeyInput); bool Render(); bool Release(); };};}; diff --git a/Code/Game/GameLogic/Game.cpp b/Code/Game/GameLogic/Game.cpp index 7e54fcee..636b152c 100644 --- a/Code/Game/GameLogic/Game.cpp +++ b/Code/Game/GameLogic/Game.cpp @@ -71,7 +71,9 @@ void Game::Update(keyInput keyPressed, float pitch, float yaw) } void Game::Render() { - Oyster::Graphics::API::NewFrame(camera->View(), camera->Proj()); + Oyster::Graphics::API::SetView(camera->View()); + Oyster::Graphics::API::SetProjection(camera->Proj()); + Oyster::Graphics::API::NewFrame(); player->Render(); box->Render(); } \ No newline at end of file diff --git a/Code/Misc/Resource/OResourceHandler.cpp b/Code/Misc/Resource/OResourceHandler.cpp index f86c434c..918ecd1d 100644 --- a/Code/Misc/Resource/OResourceHandler.cpp +++ b/Code/Misc/Resource/OResourceHandler.cpp @@ -120,11 +120,12 @@ void OysterResource::Clean() //Remove all the references while (!OResource::Release(i->second)); - const wchar_t* temp = i->second->GetResourceFilename(); + std::wstring temp = i->second->GetResourceFilename(); delete resourcePrivate.resources[temp]; - resourcePrivate.resources.erase(temp); + } + resourcePrivate.resources.clear(); } void OysterResource::ReleaseResource(const OHRESOURCE& resourceData) { @@ -133,7 +134,7 @@ void OysterResource::ReleaseResource(const OHRESOURCE& resourceData) { if(OResource::Release(t)) { - const wchar_t* temp = t->GetResourceFilename(); + std::wstring temp = t->GetResourceFilename(); delete resourcePrivate.resources[temp]; resourcePrivate.resources.erase(temp); } @@ -146,7 +147,7 @@ void OysterResource::ReleaseResource(const wchar_t filename[]) { if(OResource::Release(t)) { - const wchar_t* temp = t->GetResourceFilename(); + std::wstring temp = t->GetResourceFilename(); delete resourcePrivate.resources[temp]; resourcePrivate.resources.erase(temp); } diff --git a/Code/Network/NetworkDependencies/WinsockFunctions.cpp b/Code/Network/NetworkDependencies/WinsockFunctions.cpp index ea3c3b00..3e2e32f3 100644 --- a/Code/Network/NetworkDependencies/WinsockFunctions.cpp +++ b/Code/Network/NetworkDependencies/WinsockFunctions.cpp @@ -17,7 +17,7 @@ std::wstring GetErrorMessage(int errorCode) LPWSTR lpMessage; std::wstring retVal(L"Succesful"); - DWORD bufLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS , + DWORD bufLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS , NULL, errorCode , MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) , diff --git a/Code/OysterGraphics/Core/Init.cpp b/Code/OysterGraphics/Core/Init.cpp index c69b80b4..548615d2 100644 --- a/Code/OysterGraphics/Core/Init.cpp +++ b/Code/OysterGraphics/Core/Init.cpp @@ -32,7 +32,8 @@ namespace Oyster log << "DirectX running in debug mode.\n"; createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif - + + createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG; D3D_FEATURE_LEVEL featureLevelsToTry[] = { diff --git a/Code/OysterGraphics/Core/ShaderManager.cpp b/Code/OysterGraphics/Core/ShaderManager.cpp index 94f7fd57..c4f1b38e 100644 --- a/Code/OysterGraphics/Core/ShaderManager.cpp +++ b/Code/OysterGraphics/Core/ShaderManager.cpp @@ -279,7 +279,7 @@ namespace Oyster void Core::ShaderManager::Clean() { - for(int i = 0; i < VData.size(); ++i) + for(int i = 0; i < (int)VData.size(); ++i) { delete[] VData[i].data; } diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp index b5de4fda..fcb3481c 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.cpp @@ -4,11 +4,18 @@ #include "../Render/Rendering/Render.h" #include "../FileLoader/ObjReader.h" #include "../../Misc/Resource/OysterResource.h" +#include "../FileLoader/GeneralLoader.h" namespace Oyster { namespace Graphics { + namespace + { + Math::Float4x4 View; + Math::Float4x4 Projection; + } + API::State API::Init(HWND Window, bool MSAA_Quality, bool Fullscreen, Math::Float2 resulotion) { Core::resolution = resulotion; @@ -26,16 +33,31 @@ namespace Oyster return API::Sucsess; } - void API::NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection) + void API::SetProjection(Math::Float4x4& projection) + { + Projection = projection; + } + + void API::SetView(Math::Float4x4& view) + { + View = view; + } + + void API::NewFrame() { Render::Rendering::Basic::NewFrame(View, Projection); } - void API::RenderScene(Model::Model* models, int count) + void API::RenderScene(Model::Model models[], int count) { Render::Rendering::Basic::RenderScene(models,count); } + void API::RenderModel(Model::Model& m) + { + Render::Rendering::Basic::RenderScene(&m,1); + } + void API::EndFrame() { Render::Rendering::Basic::EndFrame(); @@ -52,9 +74,7 @@ namespace Oyster m->WorldMatrix = Oyster::Math::Float4x4::identity; m->Visible = true; - OBJReader or; - or.readOBJFile(filename); - m->info = or.toModel(); + m->info = Oyster::Resource::OysterResource::LoadResource(filename.c_str(),Oyster::Graphics::Loading::LoadOBJ); return m; } @@ -63,7 +83,7 @@ namespace Oyster { Model::ModelInfo* info = (Model::ModelInfo*)model->info; delete model; - info->Vertices->~Buffer(); + Oyster::Resource::OysterResource::ReleaseResource((Oyster::Resource::OHRESOURCE)info); } void API::Clean() @@ -72,6 +92,14 @@ namespace Oyster Oyster::Resource::OysterResource::Clean(); Oyster::Graphics::Core::ShaderManager::Clean(); Oyster::Graphics::Render::Resources::Clean(); + + SAFE_RELEASE(Core::depthStencil); + SAFE_RELEASE(Core::backBufferRTV); + SAFE_RELEASE(Core::backBufferUAV); + + SAFE_RELEASE(Core::swapChain); + SAFE_RELEASE(Core::deviceContext); + SAFE_RELEASE(Core::device); } } } \ No newline at end of file diff --git a/Code/OysterGraphics/DllInterfaces/GFXAPI.h b/Code/OysterGraphics/DllInterfaces/GFXAPI.h index bd07c391..f4c38076 100644 --- a/Code/OysterGraphics/DllInterfaces/GFXAPI.h +++ b/Code/OysterGraphics/DllInterfaces/GFXAPI.h @@ -4,10 +4,10 @@ #include "OysterMath.h" #include -#if defined GFX_DLL_EXPORT +#ifdef GFX_DLL_EXPORT #define GFX_DLL_USAGE __declspec(dllexport) #else - #define GFX_DLL_USAGE __declspec(dllimport) + #define GFX_DLL_USAGE #endif namespace Oyster @@ -28,9 +28,14 @@ namespace Oyster static State Init(HWND Window, bool MSAA_Quality, bool Fullscreen, Oyster::Math::Float2 StartResulotion); static void Clean(); - //! @brief from Oyster::Math Float4x4, expects corect methods - static void NewFrame(Oyster::Math::Float4x4 View, Oyster::Math::Float4x4 Projection); - static void RenderScene(Oyster::Graphics::Model::Model* models, int count); + + static void SetView(Oyster::Math::Float4x4& View); + static void SetProjection(Oyster::Math::Float4x4& Projection); + + //! @brief will internally use last values from SetView and SetProjection + static void NewFrame(); + static void RenderScene(Oyster::Graphics::Model::Model models[], int count); + static void RenderModel(Oyster::Graphics::Model::Model& model); static void EndFrame(); static Oyster::Graphics::Model::Model* CreateModel(std::wstring filename); diff --git a/Code/OysterGraphics/FileLoader/GeneralLoader.h b/Code/OysterGraphics/FileLoader/GeneralLoader.h index fcce1e02..4eab570b 100644 --- a/Code/OysterGraphics/FileLoader/GeneralLoader.h +++ b/Code/OysterGraphics/FileLoader/GeneralLoader.h @@ -27,7 +27,8 @@ namespace Oyster void UnloadShaderD(void* loadedData); void LoadShaderD(const wchar_t filename[], Oyster::Resource::CustomData& out); - void LoadShader(const wchar_t filename[], Oyster::Resource::CustomData& out, int type); + void UnloadOBJ(void* loadedData); + void LoadOBJ(const wchar_t filename[], Oyster::Resource::CustomData& out); } } } \ No newline at end of file diff --git a/Code/OysterGraphics/FileLoader/TextureLoader.cpp b/Code/OysterGraphics/FileLoader/ModelLoader.cpp similarity index 97% rename from Code/OysterGraphics/FileLoader/TextureLoader.cpp rename to Code/OysterGraphics/FileLoader/ModelLoader.cpp index 1c6ba263..0fe623a9 100644 --- a/Code/OysterGraphics/FileLoader/TextureLoader.cpp +++ b/Code/OysterGraphics/FileLoader/ModelLoader.cpp @@ -1,6 +1,7 @@ #include "GeneralLoader.h" #include "..\Core\Dx11Includes.h" #include "..\Core\Core.h" +#include "ObjReader.h" HRESULT CreateWICTextureFromFileEx( ID3D11Device* d3dDevice, ID3D11DeviceContext* d3dContext, @@ -35,6 +36,30 @@ void Oyster::Graphics::Loading::UnloadTexture(void* data) SAFE_RELEASE(srv); } +void Oyster::Graphics::Loading::LoadOBJ(const wchar_t filename[], Oyster::Resource::CustomData& out) +{ + OBJReader obj; + obj.readOBJFile(filename); + Model::ModelInfo* info; + info = obj.toModel(); + out.loadedData = info; + out.resourceUnloadFnc = Oyster::Graphics::Loading::UnloadOBJ; +} + +void Oyster::Graphics::Loading::UnloadOBJ(void* data) +{ + Model::ModelInfo* info = (Model::ModelInfo*) data; + SAFE_DELETE(info->Vertices); + if(info->Indexed) + { + SAFE_DELETE(info->Indecies); + } + for(int i =0;iMaterial.size();++i) + { + Oyster::Resource::OysterResource::ReleaseResource(info->Material[i]); + } + delete info; +} #include #include diff --git a/Code/OysterGraphics/FileLoader/ObjReader.cpp b/Code/OysterGraphics/FileLoader/ObjReader.cpp index 7eb1e268..923f0747 100644 --- a/Code/OysterGraphics/FileLoader/ObjReader.cpp +++ b/Code/OysterGraphics/FileLoader/ObjReader.cpp @@ -95,7 +95,7 @@ void OBJReader::readOBJFile( std::wstring fileName ) inStream.close(); - Mat = Oyster::Resource::OysterResource::LoadResource((fileName + L".jpg").c_str(),Oyster::Graphics::Loading::LoadTexture); + Mat = Oyster::Resource::OysterResource::LoadResource((fileName + L".png").c_str(),Oyster::Graphics::Loading::LoadTexture); } Oyster::Graphics::Model::ModelInfo* OBJReader::toModel() diff --git a/Code/OysterGraphics/FileLoader/ShaderLoader.cpp b/Code/OysterGraphics/FileLoader/ShaderLoader.cpp index 5a7ba9e3..b3c8a0b7 100644 --- a/Code/OysterGraphics/FileLoader/ShaderLoader.cpp +++ b/Code/OysterGraphics/FileLoader/ShaderLoader.cpp @@ -10,6 +10,8 @@ namespace Oyster { namespace Loading { + void LoadShader(const wchar_t filename[], Oyster::Resource::CustomData& out, int type); + void UnloadShaderP(void* loadedData) { ID3D11PixelShader* ps = ((ID3D11PixelShader*)loadedData); @@ -165,14 +167,16 @@ namespace Oyster data.data = new char[data.size]; memcpy(data.data,Shader->GetBufferPointer(),data.size); #else + std::ifstream stream; + stream.open(filename, std::ifstream::in | std::ifstream::binary); if(stream.good()) { stream.seekg(0, std::ios::end); - sd.size = size_t(stream.tellg()); - sd.data = new char[sd.size]; + data.size = size_t(stream.tellg()); + data.data = new char[data.size]; stream.seekg(0, std::ios::beg); - stream.read(&sd.data[0], sd.size); + stream.read(&data.data[0], data.size); stream.close(); } else @@ -180,7 +184,6 @@ namespace Oyster memset(&out,0,sizeof(out)); return; } - #endif out.loadedData = Core::ShaderManager::CreateShader(data, Core::ShaderManager::ShaderType(type)); } diff --git a/Code/OysterGraphics/OysterGraphics.vcxproj b/Code/OysterGraphics/OysterGraphics.vcxproj index 0df3d45b..cd1a5670 100644 --- a/Code/OysterGraphics/OysterGraphics.vcxproj +++ b/Code/OysterGraphics/OysterGraphics.vcxproj @@ -109,6 +109,7 @@ $(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso + 5.0 @@ -124,12 +125,13 @@ $(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso + 5.0 Level3 - MaxSpeed + Disabled true true true @@ -143,12 +145,14 @@ $(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso + true + 5.0 Level3 - MaxSpeed + Disabled true true true @@ -162,6 +166,8 @@ $(SolutionDir)..\Bin\Content\Shaders\%(Filename).cso + true + 5.0 @@ -172,7 +178,7 @@ - + @@ -264,6 +270,8 @@ + + diff --git a/Code/OysterGraphics/Render/Rendering/BasicRender.cpp b/Code/OysterGraphics/Render/Rendering/BasicRender.cpp index 50e7f9f1..2edb318b 100644 --- a/Code/OysterGraphics/Render/Rendering/BasicRender.cpp +++ b/Code/OysterGraphics/Render/Rendering/BasicRender.cpp @@ -2,6 +2,8 @@ #include "../Resources/Resources.h" #include "../../Definitions/GraphicalDefinition.h" #include "../../Model/ModelInfo.h" +#include +#include namespace Oyster { @@ -60,7 +62,8 @@ namespace Oyster } void Basic::EndFrame() { - Core::swapChain->Present(0,0); + IDXGISwapChain* chain = Core::swapChain; + chain->Present(0,0); } } } diff --git a/Code/OysterGraphics/Render/Resources/Resources.cpp b/Code/OysterGraphics/Render/Resources/Resources.cpp index 2bda54e1..ceef5160 100644 --- a/Code/OysterGraphics/Render/Resources/Resources.cpp +++ b/Code/OysterGraphics/Render/Resources/Resources.cpp @@ -3,7 +3,8 @@ // /Bin/Executable/Tester -> // /Code/OysterGraphics/Shader/HLSL -const std::wstring PathFromExeToHlsl = L"..\\..\\..\\Code\\OysterGraphics\\Shader\\HLSL\\"; +const std::wstring PathFromExeToCso = L"..\\Content\\Shaders\\"; +const std::wstring PathFromExeToHlsl = L"..\\..\\Code\\OysterGraphics\\Shader\\HLSL\\"; const std::wstring VertexTransformDebug = L"TransformDebugVertex"; const std::wstring VertexDebug = L"DebugVertex"; const std::wstring PixelRed = L"DebugPixel"; @@ -42,6 +43,12 @@ namespace Oyster #else /** Load Vertex Shader with Precompiled */ + Core::ShaderManager::Init(PathFromExeToCso + L"DebugCameraVertex.cso",ShaderType::Vertex, VertexTransformDebug); + Core::ShaderManager::Init(PathFromExeToCso + L"DebugVertex.cso",ShaderType::Vertex, VertexDebug); + + /** Load Pixel Shader with Precompiled */ + Core::ShaderManager::Init(PathFromExeToCso + L"DebugPixel.cso",ShaderType::Pixel, PixelRed); + Core::ShaderManager::Init(PathFromExeToCso + L"TextureDebug.cso",ShaderType::Pixel, PixelTexture); #endif #pragma endregion @@ -152,10 +159,9 @@ namespace Oyster void Resources::Clean() { Resources::ModelData.~Buffer(); - Resources::VPData.~Buffer(); for(int i = 0; i < obj.CBuffers.Vertex.size(); ++i) { - //SAFE_RELEASE(obj.CBuffers.Vertex[i]); + obj.CBuffers.Vertex[i]->~Buffer(); } for(int i = 0; i < obj.CBuffers.Pixel.size(); ++i) { diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/Defines.hlsli b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/Defines.hlsli index e5a2333f..3f9fd0bf 100644 --- a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/Defines.hlsli +++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/Defines.hlsli @@ -1,7 +1,31 @@ +#ifndef DEFINES +#define DEFINES + struct PointLight { - float3 Pos; - float Radius; + float4 PosRadius; + float4 ColorBright; +}; - float3 Color; -} \ No newline at end of file +struct DiffSpec +{ + float3 Diffuse; + float3 Specular; +}; + +cbuffer PointLights : register(b0) +{ + PointLight pl; +} + +cbuffer LightConstants : register(b1) +{ + float4x4 InvProj; + int2 Pixels; +} + +Texture2D DiffuseGlow : register(t0); +Texture2D NormalSpec : register(t1); +Texture2D DepthTexture : register(t2); + +#endif \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightCalc.hlsli b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightCalc.hlsli new file mode 100644 index 00000000..88234de0 --- /dev/null +++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightCalc.hlsli @@ -0,0 +1,23 @@ +#include "Defines.hlsli" + +DiffSpec LightCalc(PointLight pl, float3 pos, int2 texCoord) +{ + DiffSpec output; + float4 normalSpec = NormalSpec[texCoord]; + float3 lightVec = pl.PosRadius.xyz - pos.xyz; + float d = length(lightVec); + lightVec = lightVec/d; + + float diffFactor = max(dot(lightVec, normalSpec.xyz), 0.0f); + float3 v = reflect(-lightVec, normalSpec.xyz); + float specFactor = pow(max(dot(v,normalize(-pos)), 0.0f),normalSpec.w); + //Check att later + float att = (max(d-pl.PosRadius.w,0)/pow(pl.PosRadius.w,2)); + + //fix Ilum calcs instead of PhongBlinn + output.Diffuse = pl.ColorBright.w * att * diffFactor * pl.ColorBright.xyz; + output.Specular = pl.ColorBright.w * att * specFactor * pl.ColorBright.xyz; + if(diffFactor == 0) + output.Specular * 0; + return output; +} \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightPass.hlsl b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightPass.hlsl index 8fdac3c8..3e544f2f 100644 --- a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightPass.hlsl +++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/LightPass.hlsl @@ -1,11 +1,16 @@ - +#include "Defines.hlsli" +#include "LightCalc.hlsli" +#include "PosManipulation.hlsli" //todo //LightCulling //Calc Diff + Spec //Calc Ambience //Write Glow + [numthreads(1, 1, 1)] void main( uint3 DTid : SV_DispatchThreadID ) { + float3 ViewPos = ToVpos(DTid.xy); + //DiffSpec LightCalc(pl, float3 pos) } \ No newline at end of file diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/PosManipulation.hlsli b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/PosManipulation.hlsli new file mode 100644 index 00000000..ab44bd38 --- /dev/null +++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/Render/PosManipulation.hlsli @@ -0,0 +1,21 @@ +#include "Defines.hlsli" + +//assumes ProperfloatTexCoords +float3 ToVpos(float2 texCoord) +{ + //Get proper UV + float2 UV = float2(texCoord) / float2(Pixels); + + float4 ViewPos; + // Get the depth value for this pixel + ViewPos.z= DepthTexture[texCoord].x; + //Get X/w + ViewPos.x = UV.x * 2 - 1; + //Get Y/w + ViewPos.y = 1 - 2 * UV.y; + ViewPos.w = 1; + + //Un project + ViewPos = mul(ViewPos, InvProj); + return ViewPos.xyz / ViewPos.w; +} \ No newline at end of file diff --git a/Code/Tester/MainTest.cpp b/Code/Tester/MainTest.cpp index cbf563c6..3d55a0a7 100644 --- a/Code/Tester/MainTest.cpp +++ b/Code/Tester/MainTest.cpp @@ -18,6 +18,7 @@ HINSTANCE g_hInst = NULL; HWND g_hWnd = NULL; Oyster::Graphics::Model::Model* m = NULL; +Oyster::Graphics::Model::Model* m2 = NULL; Oyster::Math::Float4x4 V; Oyster::Math::Float4x4 P; @@ -41,7 +42,7 @@ HRESULT InitDirect3D(); int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) { - BOOL b = SetDllDirectoryW(L"..\\..\\DLL"); + BOOL b = SetDllDirectoryW(L"..\\DLL"); typedef struct tagLOADPARMS32 { LPSTR lpEnvAddress; // address of environment strings @@ -92,6 +93,7 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdL } Oyster::Graphics::API::DeleteModel(m); + Oyster::Graphics::API::DeleteModel(m2); Oyster::Graphics::API::Clean(); return (int) msg.wParam; } @@ -186,11 +188,15 @@ HRESULT InitDirect3D() #pragma endregion #pragma region Obj - m = Oyster::Graphics::API::CreateModel(L"orca"); + m = Oyster::Graphics::API::CreateModel(L"crate"); + m2 = Oyster::Graphics::API::CreateModel(L"crate"); + m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3::null,Oyster::Math::Float3(0,5,0),Oyster::Math::Float3::null); #pragma endregion P = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000); + Oyster::Graphics::API::SetProjection(P); + P.Invert(); V = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),Oyster::Math::Float3(0,0,5.4f)); V = Oyster::Math3D::InverseOrientationMatrix(V); @@ -203,14 +209,17 @@ HRESULT Update(float deltaTime) { angle += Oyster::Math::pi/30000; m->WorldMatrix = Oyster::Math3D::RotationMatrix_AxisY(angle); + m2->WorldMatrix = Oyster::Math3D::OrientationMatrix(Oyster::Math::Float3(0,0,1)*-angle,Oyster::Math::Float3(0,4,0),Oyster::Math::Float3::null); return S_OK; } HRESULT Render(float deltaTime) { - Oyster::Graphics::API::NewFrame(V,P); + Oyster::Graphics::API::SetView(V); + Oyster::Graphics::API::NewFrame(); - Oyster::Graphics::API::RenderScene(m,1); + Oyster::Graphics::API::RenderModel(*m); + Oyster::Graphics::API::RenderModel(*m2); Oyster::Graphics::API::EndFrame(); diff --git a/Code/Tester/Tester.vcxproj b/Code/Tester/Tester.vcxproj index 3f48d244..80853c72 100644 --- a/Code/Tester/Tester.vcxproj +++ b/Code/Tester/Tester.vcxproj @@ -69,7 +69,7 @@ true $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ - $(SolutionDir)..\Bin\Executable\$(ProjectName)\ + $(SolutionDir)..\Bin\Executable\ $(ProjectName)_$(PlatformShortName)D C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath) C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath) @@ -77,7 +77,7 @@ true $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ - $(SolutionDir)..\Bin\Executable\$(ProjectName)\ + $(SolutionDir)..\Bin\Executable\ $(ProjectName)_$(PlatformShortName)D C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath) C:\Program Files (x86)\Visual Leak Detector\lib\Win64;$(LibraryPath) @@ -85,7 +85,7 @@ false $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ - $(SolutionDir)..\Bin\Executable\$(ProjectName)\ + $(SolutionDir)..\Bin\Executable\ $(ProjectName)_$(PlatformShortName) C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath) C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath) @@ -93,7 +93,7 @@ false $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ - $(SolutionDir)..\Bin\Executable\$(ProjectName)\ + $(SolutionDir)..\Bin\Executable\ $(ProjectName)_$(PlatformShortName) C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath) C:\Program Files (x86)\Visual Leak Detector\lib\Win64;$(LibraryPath) @@ -113,7 +113,7 @@ true OysterGraphics_$(PlatformShortName)D.lib;%(AdditionalDependencies) $(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories) - OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs) + OysterGraphics_x86D.dll;%(DelayLoadDLLs) @@ -136,7 +136,6 @@ OysterGraphics_$(PlatformShortName)D.lib;%(AdditionalDependencies) $(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories) true - OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs) @@ -144,9 +143,9 @@ Level3 - MaxSpeed + Disabled true - true + false WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true ..\OysterGraphics;..\OysterMath;..\Misc;%(AdditionalIncludeDirectories) @@ -159,7 +158,7 @@ OysterGraphics_$(PlatformShortName).lib;%(AdditionalDependencies) $(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories) true - OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs) + OysterGraphics_x86.dll; @@ -167,7 +166,7 @@ Level3 - MaxSpeed + Disabled true true WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) @@ -182,7 +181,6 @@ OysterGraphics_$(PlatformShortName).lib;%(AdditionalDependencies) $(SolutionDir)..\Bin\DLL;%(AdditionalLibraryDirectories) true - OysterGraphics_$(PlatformShortName)D.dll;%(DelayLoadDLLs)