From 58418afac854b6ca3d032daa50253c9eb30a50d0 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Sun, 23 Jun 2024 14:27:59 +0900 Subject: [PATCH] example: clear buffer properly. The update might affect areas outside of the default window. Update the sample to handle window resizing. --- examples/DirectUpdate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/DirectUpdate.cpp b/examples/DirectUpdate.cpp index a361d923..482baa5a 100644 --- a/examples/DirectUpdate.cpp +++ b/examples/DirectUpdate.cpp @@ -66,6 +66,9 @@ struct UserExample : tvgexam::Example { if (!canvas) return false; + //clear buffer and redraw! + if (!tvgexam::verify(canvas->clear(false))) return false; + auto progress = tvgexam::progress(elapsed, 2.0f, true); //play time 2 sec. //Reset Shape