Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
IRenderer.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <string>
5
6#include "core/GameState.hpp"
7
11class IRenderer {
12 public:
13 virtual ~IRenderer() = default;
14
15 virtual void init() = 0;
16 virtual void setState(const GameState& state) = 0;
17 virtual void render() = 0;
18 virtual void handleInput() = 0;
19 virtual bool shouldClose() = 0;
20 virtual void shutdown() = 0;
21 virtual void setDevMode(bool dev, int port, const std::string& machine) = 0;
22 virtual std::optional<int> getPendingSpeedChange() = 0;
23};
Represents the current state of the game. Knows the world state, some metadata, and how to apply even...
Definition GameState.hpp:15
Pure interface for rendering the game state.
Definition IRenderer.hpp:11
virtual void render()=0
virtual std::optional< int > getPendingSpeedChange()=0
virtual bool shouldClose()=0
virtual void setState(const GameState &state)=0
virtual void init()=0
virtual void shutdown()=0
virtual ~IRenderer()=default
virtual void setDevMode(bool dev, int port, const std::string &machine)=0
virtual void handleInput()=0