SFRenderer.hpp
Go to the documentation of this file.
//
// Created by cbihan on 1/30/20.
//
#ifndef COMSQUARE_SFRENDERER_HPP
#define COMSQUARE_SFRENDERER_HPP
#include "IRenderer.hpp"
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics//RenderWindow.hpp>
namespace ComSquare::Renderer
{
class SFRenderer : public IRenderer {
private:
sf::Window window;
sf::VideoMode videoMode;
public:
void setWindowName(std::string) override;
void drawScreen() override;
void putPixel(int x, int y, uint8_t rgba) override ;
};
}
#endif //COMSQUARE_SFRENDERER_HPP
ComSquare::Renderer::SFRenderer::putPixel
void putPixel(int x, int y, uint8_t rgba) override
Add a pixel to the buffer to the coordinates x, y with the color rgba.
Definition: SFRenderer.cpp:19
ComSquare::Renderer::SFRenderer::setWindowName
void setWindowName(std::string) override
Set a new name to the window, if there is already a name it will be overwrite.
Definition: SFRenderer.cpp:9
ComSquare::Renderer::SFRenderer::window
sf::Window window
The main Window.
Definition: SFRenderer.hpp:20
ComSquare::Renderer::SFRenderer::drawScreen
void drawScreen() override
Update the screen by printing the buffer.
Definition: SFRenderer.cpp:14
ComSquare::Renderer
Definition: IRenderer.hpp:10
ComSquare::Renderer::SFRenderer
Definition: SFRenderer.hpp:17
ComSquare::Renderer::SFRenderer::videoMode
sf::VideoMode videoMode
Video Mode containing the height and width of the window.
Definition: SFRenderer.hpp:22
ComSquare::Renderer::IRenderer
Definition: IRenderer.hpp:12
IRenderer.hpp