diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-12 12:42:46 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-12 12:42:46 +0200 |
commit | 31dbd326f69656473067dde6d4f008cd7c04f0b1 (patch) | |
tree | 6cc6df2ef6eaedefad81532c9e6f3202b4d0fdd6 /View.h | |
parent | 12a719a9fd9b8e89159c407c3b612b226c860778 (diff) |
begin visualization
Diffstat (limited to 'View.h')
-rw-r--r-- | View.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1,6 +1,31 @@ #pragma once +#include "Color.h" +#include "Rectangle.h" +#include <SDL2/SDL.h> +#include <thread> + class View { +public: + View(); + virtual ~View(); + +public: + virtual void set_size(unsigned int width, unsigned int height); + virtual void draw_begin(); + virtual void draw_rect(Rectangle r, Color c); + virtual void draw_end(); + +public: + bool open = true; + +private: + unsigned int width = 0, height = 0; + SDL_Window * window = nullptr; + SDL_Renderer * renderer = nullptr; +private: + std::thread * worker = nullptr; + void work(); }; |