Async render passes

This commit is contained in:
2021-11-24 12:10:23 +01:00
parent 94be513538
commit 5fafdda770
23 changed files with 199 additions and 162 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
#pragma once
#include "Graphics/RenderPass/RenderGraph.h"
#include "ThreadPool.h"
namespace Seele
{
@@ -20,15 +21,17 @@ public:
// These are called from the render thread
// prepare render is also locked, so reading from shared memory is also safe
virtual void prepareRender() {}
virtual void render() {}
virtual Job render() { co_return; }
void applyArea(URect area);
void setFocused();
Event renderFinished() { return renderFinishedEvent; }
protected:
Gfx::PGraphics graphics;
Gfx::PViewport viewport;
PWindow owner;
std::string name;
Event renderFinishedEvent;
virtual void keyCallback(KeyCode code, InputAction action, KeyModifier modifier) = 0;
virtual void mouseMoveCallback(double xPos, double yPos) = 0;