Finished writeup and fixed crashes
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
target_sources(SeeleEngine
|
||||
PRIVATE
|
||||
Frame.h
|
||||
Frame.cpp
|
||||
InspectorView.h
|
||||
InspectorView.cpp
|
||||
SceneView.h
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
#include "View.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
// A frame is the mutable data needed to
|
||||
// process a time step for the game updates
|
||||
// It contains all the game update relevant data
|
||||
// and is handed over to the renderer for read only processing
|
||||
// If the game loop runs faster than the renderer, the renderer
|
||||
// simply discards old Frames and starts working on the more recent ones
|
||||
// if the game loop runs slower than the renderer (bad), the renderer has to wait
|
||||
struct Frame
|
||||
{
|
||||
uint64 frameNumber;
|
||||
Array<PViewFrame> viewFrame;
|
||||
};
|
||||
} // namespace Seele
|
||||
@@ -25,10 +25,10 @@ void Window::render()
|
||||
gfxHandle->beginFrame();
|
||||
for(auto& windowView : views)
|
||||
{
|
||||
{
|
||||
std::lock_guard lock(windowView->workerMutex);
|
||||
windowView->view->prepareRender();
|
||||
}
|
||||
windowView->view->beginUpdate();
|
||||
windowView->view->update();
|
||||
windowView->view->commitUpdate();
|
||||
windowView->view->prepareRender();
|
||||
windowView->view->render();
|
||||
}
|
||||
gfxHandle->endFrame();
|
||||
@@ -58,9 +58,5 @@ void Window::viewWorker(WindowView* windowView)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
windowView->view->beginUpdate();
|
||||
windowView->view->update();
|
||||
std::lock_guard lock(windowView->workerMutex);
|
||||
windowView->view->commitUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user