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

@ -6,7 +6,7 @@ using namespace Crafter;
int main() {
WindowWayland window(1280, 720, "Hello Input!");
RenderingElement element(
RenderingElementScaling element(
true, //opaque, wether the element is opague or semi-transparant
2, //bufferWidth: the width of this elements pixel buffer
1, //bufferHeight: the height of this elements pixel buffer
@ -21,6 +21,7 @@ int main() {
);
window.elements.push_back(&element);
element.buffer = {{255, 0, 0 ,255}, {0, 255, 0 ,255}};
element.UpdatePosition(window);
Animation<std::tuple<std::int_fast32_t>> anim({
@ -39,7 +40,6 @@ int main() {
window.LogTiming();
});
element.buffer = {{255, 0, 0 ,255}, {0, 255, 0 ,255}};
window.StartUpdate();
window.StartSync();
}