example: clear buffer properly.

The update might affect areas outside of the
default window. Update the sample to handle window
resizing.
This commit is contained in:
Hermet Park 2024-06-23 14:27:59 +09:00 committed by Hermet Park
parent 2c7a83406e
commit 58418afac8

View file

@ -66,6 +66,9 @@ struct UserExample : tvgexam::Example
{ {
if (!canvas) return false; 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. auto progress = tvgexam::progress(elapsed, 2.0f, true); //play time 2 sec.
//Reset Shape //Reset Shape