Dawn/src/dawnopengl/display/RenderManager.hpp
2024-06-24 08:45:12 -05:00

59 lines
1.4 KiB
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "dawn.hpp"
#include "display/RenderTarget.hpp"
#include "display/BackBuffer.hpp"
#if DAWN_OPENGL_SHADERS
#include "display/shader/ShaderManager.hpp"
#endif
namespace Dawn {
class Game;
class RenderManager {
private:
std::shared_ptr<BackBuffer> backBuffer = nullptr;
public:
#if DAWN_OPENGL_SHADERS
ShaderManager shaderManager;
#endif
/**
* Creates a render manager.
*/
RenderManager();
/**
* Initializes the render manager, called by the game during the initial
* set up of the engine.
*
* @param game Game that requested the render manager to initialize.
*/
void init(const Game &game);
/**
* Performs an update/tick of the render manager. This would be the game
* asking the RenderManager to do the rendering.
*/
void update(const Game &game);
/**
* Returns the back buffer render target. This is the render target that
* is used to render to the screen.
*
* @return The back buffer render target.
*/
std::shared_ptr<BackBuffer> getBackBufferRenderTarget();
/**
* Destroys the render manager.
*/
~RenderManager();
};
}