47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
// Copyright (c) 2022 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "RenderTarget.hpp"
|
|
|
|
namespace Dawn {
|
|
class DawnGame;
|
|
class RenderPipeline;
|
|
|
|
class IRenderManager {
|
|
public:
|
|
DawnGame &game;
|
|
std::shared_ptr<RenderPipeline> renderPipeline;
|
|
|
|
/**
|
|
* Default constructor for a render manager instance.
|
|
*
|
|
* @param game Game that this render manager belongs to.
|
|
*/
|
|
IRenderManager(DawnGame &game) : game(game) {}
|
|
|
|
/**
|
|
* Returns the primary render target (the backbuffer) that draws directly
|
|
* to the screen.
|
|
*
|
|
* @return Shared pointer to the backbuffer render target.
|
|
*/
|
|
virtual RenderTarget & getBackBuffer() = 0;
|
|
|
|
virtual RenderPipeline & getRenderPipeline() = 0;
|
|
|
|
/**
|
|
* Initialize / Start the Render Manager.
|
|
*
|
|
* @param game Game instance this render manager belongs to.
|
|
*/
|
|
virtual void init() = 0;
|
|
|
|
/**
|
|
* Perform a synchronous frame update on the render manager.
|
|
*/
|
|
virtual void update() = 0;
|
|
};
|
|
} |