physics rewrite

This commit is contained in:
turanszkij
2018-09-23 19:40:14 +01:00
parent 31a948e7e2
commit 4277332f7f
15 changed files with 526 additions and 1021 deletions
-10
View File
@@ -14,8 +14,6 @@
#include "wiProfiler.h"
#include "wiInitializer.h"
#include "wiStartupArguments.h"
#include "wiPHYSICS.h"
#include "wiBULLET.h"
#include "wiGraphicsDevice_DX11.h"
#include "wiGraphicsDevice_DX12.h"
@@ -43,16 +41,12 @@ MainComponent::MainComponent()
infoDisplay = InfoDisplayer();
fadeManager.Clear();
physicsEngine = new wiBULLET;
}
MainComponent::~MainComponent()
{
wiRenderer::GetDevice()->WaitForGPU();
SAFE_DELETE(physicsEngine);
}
void MainComponent::Initialize()
@@ -154,10 +148,6 @@ void MainComponent::Run()
}
wiProfiler::GetInstance().EndRange(); // Fixed Update
wiProfiler::GetInstance().BeginRange("Physics", wiProfiler::DOMAIN_CPU);
physicsEngine->Update((float)elapsedTime);
wiProfiler::GetInstance().EndRange(); // Physics
wiLua::GetGlobal()->SetDeltaTime(elapsedTime);
// Variable-timed update: