aboutsummaryrefslogtreecommitdiff
path: root/src/renderer/RenderGroup.hpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-09-29 13:20:43 +0200
committerfschildt <florian.schildt@protonmail.com>2025-09-29 13:20:43 +0200
commit9d72ed2d5801b1506158082f08bd0b47e58db17f (patch)
tree1fe30ab6dae55db5a3faaac6b8d54f67a31255d3 /src/renderer/RenderGroup.hpp
parentd793b79dea7d5e19982128528276cf05d6c23b5d (diff)
renderer: major refactor; vectors: now aggregates
Diffstat (limited to 'src/renderer/RenderGroup.hpp')
-rw-r--r--src/renderer/RenderGroup.hpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/renderer/RenderGroup.hpp b/src/renderer/RenderGroup.hpp
deleted file mode 100644
index ddaa9ff..0000000
--- a/src/renderer/RenderGroup.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-#pragma once
-
-#include <basic/defs.hpp>
-#include <basic/math.hpp>
-#include <vector>
-#include <imgui.h>
-
-enum REntityType : int32_t {
- REntityType_Rectangle,
- REntityType_Bitmap,
-};
-
-struct REntity_Rectangle {
- REntityType type;
- float x0;
- float y0;
- float x1;
- float y1;
- float z;
- Color color;
-};
-
-struct REntity_Bitmap {
- REntityType type;
- float x;
- float y;
- int32_t w;
- int32_t h;
- float z;
- void *data;
-};
-
-union REntity {
- REntityType type;
- REntity_Rectangle rect;
- REntity_Bitmap bitmap;
-};
-
-struct RSortEntry {
- RSortEntry(float z, size_t entity_index);
- float z;
- size_t entity_index;
-};
-
-
-class RenderGroup {
-public:
- RenderGroup();
- void Clear(Color color);
- void Reset();
-
- void SetCameraSize(float width, float height);
- V2F32 ViewPosToScreenPos(V2F32 view_pos);
- V2F32 ViewSizeToScreenSize(V2F32 view_size);
- ImVec2 ViewPosToScreenPosImGui(V2F32 view_pos);
- ImVec2 ViewSizeToScreenSizeImGui(V2F32 view_size);
- float GetScale();
-
-
-public:
- void PushRectangle(RectF32 rect, float z, Color color);
- void PushBitmap(V3F32 pos, int w, int h, void *bitmap);
- void Sort();
-
-
-public:
- int32_t m_ScreenWidth;
- int32_t m_ScreenHeight;
-
-
-private:
- friend class Renderer;
-
- float m_CameraWidth;
- float m_CameraHeight;
-
-
- Color m_ClearColor;
-
- std::vector<REntity> m_REntities;
- std::vector<RSortEntry> m_RSortEntries;
-};
-
-