aboutsummaryrefslogtreecommitdiff
path: root/View.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-12 12:42:46 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-12 12:42:46 +0200
commit31dbd326f69656473067dde6d4f008cd7c04f0b1 (patch)
tree6cc6df2ef6eaedefad81532c9e6f3202b4d0fdd6 /View.h
parent12a719a9fd9b8e89159c407c3b612b226c860778 (diff)
begin visualization
Diffstat (limited to 'View.h')
-rw-r--r--View.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/View.h b/View.h
index aa7861e..e26c56c 100644
--- a/View.h
+++ b/View.h
@@ -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();
};