selective clearing

This commit is contained in:
Jorijn van der Graaf 2025-11-26 18:48:58 +01:00
commit 9bb36c990d
7 changed files with 98 additions and 30 deletions

View file

@ -48,16 +48,20 @@ export namespace Crafter {
class RenderingElement;
class Window {
public:
std::uint_fast32_t width;
std::uint_fast32_t height;
std::int_fast32_t width;
std::int_fast32_t height;
std::chrono::time_point<std::chrono::high_resolution_clock> lastFrameBegin;
std::vector<Transform*> elements;
Event<void> onClose;
Event<FrameTime> onUpdate;
bool open = true;
bool updating = false;
std::vector<ScaleData> dirtyRects;
void AddDirtyRect(ScaleData rect);
Window() = default;
Window(std::uint_fast32_t width, std::uint_fast32_t height);
Window(std::int_fast32_t width, std::int_fast32_t height);
Window(Window&) = delete;
Window(Window&&) = delete;
virtual ~Window() = default;