IRenderer.hpp
Go to the documentation of this file.
//
// Created by cbihan on 1/30/20.
//
#ifndef COMSQUARE_IRENDERER_HPP
#define COMSQUARE_IRENDERER_HPP
#include <string>
namespace ComSquare::Renderer
{
class IRenderer {
public:
virtual void setWindowName(std::string) = 0;
bool shouldExit;
virtual void drawScreen() = 0;
virtual void putPixel(int x, int y, uint8_t rgba) = 0;
};
}
#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.