refactor: add Window interface

This commit is contained in:
MihailRis 2025-03-21 03:35:57 +03:00
parent cd5c6a889c
commit 9694a59649
31 changed files with 859 additions and 923 deletions

View file

@ -4,10 +4,12 @@
#include "Viewport.hpp"
#include "typedefs.hpp"
class Window;
class Batch2D;
class Framebuffer;
class DrawContext {
Window& window;
const DrawContext* parent;
Viewport viewport;
Batch2D* g2d;
@ -20,7 +22,11 @@ class DrawContext {
int scissorsCount = 0;
float lineWidth = 1.0f;
public:
DrawContext(const DrawContext* parent, Viewport viewport, Batch2D* g2d);
DrawContext(
const DrawContext* parent,
Window& window,
Batch2D* g2d
);
~DrawContext();
Batch2D* getBatch2D() const;