From 75fc6aeb4a69232fd90eafc18179d8d991be57a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 23 Jun 2023 20:17:48 -0700 Subject: [PATCH] Added clear rect test. --- examples/08-update/update.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 2f3497da3..dfabaef2d 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -738,7 +738,10 @@ public: ; bgfx::setViewClear(viewId, BGFX_CLEAR_COLOR, colorRGB8); - bgfx::setViewRect(viewId, 0,0,512,512); + + const float maxBorder = 64.0f; + const uint16_t border = uint16_t(bx::abs(bx::sin(time * 4.0f)*0.5f+0.5f)*maxBorder); + bgfx::setViewRect(viewId, border, border, 512-border*2, 512-border*2); bgfx::touch(viewId); }