SFML Encapsulation
SamuelFlorentin opened this issue · comments
/Nah commented
Luka Camus commented
example for a Window class with a draw methods that was for Raytracer
:
class Window
{
public:
Window(sf::VideoMode mode = RAYTRACER_MODE,
const std::string &name = RAYTRACER_WINDOW.data());
Window(Window const &to_copy) = delete;
Window(Window &&to_move) = delete;
~Window() = default;
Window &operator=(Window const &to_copy) = delete;
Window &operator=(Window &&to_move) = delete;
void update();
void close();
sf::RenderWindow &getWindow();
template <typename TObject> void draw(TObject obj)
{
this->window.draw(obj);
}
private:
sf::RenderWindow window;
};