diff options
| author | fschildt <florian.schildt@protonmail.com> | 2025-09-17 15:30:21 +0200 | 
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2025-09-17 15:30:21 +0200 | 
| commit | f28e9c3e03a9f94764b3811f7c4aa01991943fc7 (patch) | |
| tree | 569850adf97494f5ce31dfe31a4c2703f378a144 /src/renderer/RenderGroup.hpp | |
| parent | b46a0d9369fbaa1938f0968ab216bc2d564a9c37 (diff) | |
switch to software renderer
Diffstat (limited to 'src/renderer/RenderGroup.hpp')
| -rw-r--r-- | src/renderer/RenderGroup.hpp | 31 | 
1 files changed, 16 insertions, 15 deletions
diff --git a/src/renderer/RenderGroup.hpp b/src/renderer/RenderGroup.hpp index 4904220..ddaa9ff 100644 --- a/src/renderer/RenderGroup.hpp +++ b/src/renderer/RenderGroup.hpp @@ -12,16 +12,21 @@ enum REntityType : int32_t {  struct REntity_Rectangle {      REntityType type; -    V3F32 pos; -    V2F32 dim; -    V3F32 color; +    float x0; +    float y0; +    float x1; +    float y1; +    float z; +    Color color;  };  struct REntity_Bitmap {      REntityType type; -    V3F32 pos; -    int32_t width; -    int32_t height; +    float x; +    float y; +    int32_t w; +    int32_t h; +    float z;      void *data;  }; @@ -41,7 +46,7 @@ struct RSortEntry {  class RenderGroup {  public:      RenderGroup(); -    void Clear(V3F32 color); +    void Clear(Color color);      void Reset();      void SetCameraSize(float width, float height); @@ -53,11 +58,8 @@ public:  public: -    void PushRectangle(V3F32 pos, V2F32 dim, V3F32 color); -    void PushBitmap(V3F32 pos, int width, int height, void *bitmap); - - -private: +    void PushRectangle(RectF32 rect, float z, Color color); +    void PushBitmap(V3F32 pos, int w, int h, void *bitmap);      void Sort(); @@ -67,14 +69,13 @@ public:  private: -    friend class GlRenderer; - +    friend class Renderer;      float m_CameraWidth;      float m_CameraHeight; -    V3F32 m_ClearColor; +    Color m_ClearColor;      std::vector<REntity> m_REntities;      std::vector<RSortEntry> m_RSortEntries;  | 
