From 50d0488b1f0adbd2b56dc068e1356bb5e98357da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 1 Sep 2017 08:08:01 -0700 Subject: [PATCH] 07-callback: Fixed view rect. --- examples/07-callback/callback.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/07-callback/callback.cpp b/examples/07-callback/callback.cpp index 62eac1ba4..cd816dba2 100644 --- a/examples/07-callback/callback.cpp +++ b/examples/07-callback/callback.cpp @@ -349,9 +349,6 @@ public: // Enable debug text. bgfx::setDebug(m_debug); - // Set view 0 default viewport. - bgfx::setViewRect(0, 0, 0, 1280, 720); - // Set view 0 clear state. bgfx::setViewClear(0 , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH @@ -430,6 +427,9 @@ public: if (!exit) { + // Set view 0 default viewport. + bgfx::setViewRect(0, 0, 0, bgfx::BackbufferRatio::Equal); + // This dummy draw call is here to make sure that view 0 is cleared // if no other draw calls are submitted to view 0. bgfx::touch(0);