ComSquare
IRenderer.hpp
Go to the documentation of this file.
1 //
2 // Created by cbihan on 1/30/20.
3 //
4 
5 #ifndef COMSQUARE_IRENDERER_HPP
6 #define COMSQUARE_IRENDERER_HPP
7 
8 #include <string>
9 
11 {
12  class IRenderer {
13  public:
15  virtual void setWindowName(std::string) = 0;
17  bool shouldExit;
19  virtual void drawScreen() = 0;
21  virtual void putPixel(int x, int y, uint8_t rgba) = 0;
22  };
23 }
24 
25 #endif //COMSQUARE_IRENDERER_HPP
ComSquare::Renderer::IRenderer::shouldExit
bool shouldExit
Tells to the program if the window has been closed, and therefore if he should stop.
Definition: IRenderer.hpp:17
ComSquare::Renderer::IRenderer::putPixel
virtual void putPixel(int x, int y, uint8_t rgba)=0
Set a pixel to the coordinates x, y with the color rgba.
ComSquare::Renderer::IRenderer::drawScreen
virtual void drawScreen()=0
Render the buffer to the window.
ComSquare::Renderer
Definition: IRenderer.hpp:10
ComSquare::Renderer::IRenderer
Definition: IRenderer.hpp:12
ComSquare::Renderer::IRenderer::setWindowName
virtual void setWindowName(std::string)=0
Set a new name to the window, if there is already a name it will be overwrite.