Moved some files around and got mapping working a bit, better texture support too

This commit is contained in:
Ben
2019-09-13 00:47:11 +01:00
parent 3385ff54c4
commit 1fbb093dd4
29 changed files with 7785 additions and 56 deletions

View File

@@ -126,9 +126,7 @@ void ProgressiveRenderer::Render() {
m_threadPool->RunJobsAgain();
frameEndTime = std::chrono::high_resolution_clock::now();
m_calculateTimes(frameStartTime, frameEndTime);
frameStartTime = std::chrono::high_resolution_clock::now();
}
Input();
@@ -140,8 +138,9 @@ void ProgressiveRenderer::Render() {
}
void ProgressiveRenderer::m_calculateTimes(std::chrono::high_resolution_clock::time_point frameStartTime,
std::chrono::high_resolution_clock::time_point frameEndTime) {
void ProgressiveRenderer::m_calculateTimes(std::chrono::high_resolution_clock::time_point& frameStartTime,
std::chrono::high_resolution_clock::time_point& frameEndTime) {
frameEndTime = std::chrono::high_resolution_clock::now();
m_framesRendererd++;
float frameTime = std::chrono::duration_cast<std::chrono::milliseconds>(frameEndTime - frameStartTime).count();
@@ -152,4 +151,5 @@ void ProgressiveRenderer::m_calculateTimes(std::chrono::high_resolution_clock::t
if (FrameTimes.size() > 11) FrameTimes.erase(FrameTimes.begin());
AverageFrameTime = std::accumulate(FrameTimes.begin(), FrameTimes.end(), 0.0) / FrameTimes.size();
frameStartTime = std::chrono::high_resolution_clock::now();
}