From 3f95bc6b463f629c620ba5811ca3ce53ed9c03a2 Mon Sep 17 00:00:00 2001 From: fschildt Date: Tue, 25 Nov 2025 06:21:26 +0100 Subject: add MemoryManager, enhance cmake,compile.sh --- src/renderer/Renderer.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/renderer/Renderer.hpp') diff --git a/src/renderer/Renderer.hpp b/src/renderer/Renderer.hpp index da57e29..8981826 100644 --- a/src/renderer/Renderer.hpp +++ b/src/renderer/Renderer.hpp @@ -1,8 +1,10 @@ #pragma once +#include #include #include #include +#include #include #include @@ -45,9 +47,9 @@ struct REntity_Circle { Color color; }; -struct REntity_Text { +struct REntity_String32 { REntityType type; - std::u32string& text; + String32Id id; Font& font; V2F32 pos; Color color; @@ -59,10 +61,10 @@ union REntity { REntity_AlphaBitmap bitmap; REntity_Rectangle rect; REntity_Circle circle; - REntity_Text text; + REntity_String32 string32; }; -struct RZBuffEntry { +struct RSortEntry { uint32_t z; uint32_t entity_index; }; @@ -85,7 +87,7 @@ public: void PushAlphaBitmap(AlphaBitmap& bitmap, V2F32 pos, Color color, uint32_t z); void PushRectangle(Rectangle rect, Color color, uint32_t z); void PushCircle(Circle circle, Color color, uint32_t z); - void PushText(std::u32string& text, Font& font, V2F32 pos, Color color, uint32_t z); + void PushString32(String32Id id, Font& font, V2F32 pos, Color color, uint32_t z); /* helper functions */ @@ -108,7 +110,7 @@ public: Color m_clear_color {}; std::vector m_render_entities; - std::vector m_z_buff; + std::vector m_sort_entries; std::unique_ptr m_backend; friend class RSoftwareBackend; -- cgit v1.2.3