initial commit
This commit is contained in:
23
src/engine/engine.hpp
Normal file
23
src/engine/engine.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by m on 12/3/21.
|
||||
//
|
||||
|
||||
#ifndef RLA_IIPP_ENGINE_HPP
|
||||
#define RLA_IIPP_ENGINE_HPP
|
||||
#include <memory>
|
||||
#include <chrono>
|
||||
#include "game/game.hpp"
|
||||
#include "rendering/renderer.hpp"
|
||||
static const bool SHOW_FPS = true;
|
||||
class Engine {
|
||||
public:
|
||||
Engine(std::unique_ptr<Game> game, std::unique_ptr<Renderer> renderer);
|
||||
void start_loop();
|
||||
std::chrono::time_point<std::chrono::system_clock> render_fps(std::chrono::time_point<std::chrono::system_clock> end, std::chrono::time_point<std::chrono::system_clock> lastframe);
|
||||
private:
|
||||
std::unique_ptr<Game> game;
|
||||
std::unique_ptr<Renderer> renderer;
|
||||
};
|
||||
|
||||
|
||||
#endif //RLA_IIPP_ENGINE_HPP
|
||||
Reference in New Issue
Block a user