From fc371fc24c0e03a8429cb8dce4e4e4d0e34bba23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 27 Sep 2014 11:31:04 -0700 Subject: [PATCH] Removing use of setView*Mask API. --- examples/08-update/update.cpp | 3 +- examples/09-hdr/hdr.cpp | 27 +++++++---------- .../shadowmaps_simple.cpp | 10 ++++--- examples/16-shadowmaps/shadowmaps.cpp | 26 +++-------------- examples/19-oit/oit.cpp | 3 +- examples/21-deferred/deferred.cpp | 29 +++++-------------- 6 files changed, 32 insertions(+), 66 deletions(-) diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index d5b1d38d1..74e2fa7d9 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -196,7 +196,8 @@ int _main_(int /*_argc*/, char** /*_argv*/) while (!entry::processEvents(width, height, debug, reset) ) { // Set view 0 and 1 viewport. - bgfx::setViewRectMask(0x3, 0, 0, width, height); + bgfx::setViewRect(0, 0, 0, width, height); + bgfx::setViewRect(1, 0, 0, width, height); // This dummy draw call is here to make sure that view 0 is cleared // if no other draw calls are submitted to view 0. diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp index 4868b6a70..e6a00245b 100644 --- a/examples/09-hdr/hdr.cpp +++ b/examples/09-hdr/hdr.cpp @@ -294,8 +294,12 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs); // Set views. - bgfx::setViewRectMask(0x1f, 0, 0, width, height); - bgfx::setViewFrameBufferMask(0x3, fbh); + for (uint32_t ii = 0; ii < 6; ++ii) + { + bgfx::setViewRect(ii, 0, 0, width, height); + } + bgfx::setViewFrameBuffer(0, fbh); + bgfx::setViewFrameBuffer(1, fbh); bgfx::setViewRect(2, 0, 0, 128, 128); bgfx::setViewFrameBuffer(2, lum[0]); @@ -327,19 +331,10 @@ int _main_(int /*_argc*/, char** /*_argv*/) bx::mtxOrtho(proj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f); // Set view and projection matrix for view 0. - bgfx::setViewTransformMask(0 - |(1<<0) - |(1<<2) - |(1<<3) - |(1<<4) - |(1<<5) - |(1<<6) - |(1<<7) - |(1<<8) - |(1<<9) - , view - , proj - ); + for (uint32_t ii = 0; ii < 10; ++ii) + { + bgfx::setViewTransform(ii, view, proj); + } float at[3] = { 0.0f, 1.0f, 0.0f }; float eye[3] = { 0.0f, 1.0f, -2.5f }; @@ -357,7 +352,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f); // Set view and projection matrix for view 1. - bgfx::setViewTransformMask(1<<1, view, proj); + bgfx::setViewTransform(1, view, proj); bgfx::setUniform(u_mtx, mtx); diff --git a/examples/15-shadowmaps-simple/shadowmaps_simple.cpp b/examples/15-shadowmaps-simple/shadowmaps_simple.cpp index 0681c00fd..2c73df610 100644 --- a/examples/15-shadowmaps-simple/shadowmaps_simple.cpp +++ b/examples/15-shadowmaps-simple/shadowmaps_simple.cpp @@ -16,10 +16,7 @@ #include "entry/entry.h" #define RENDER_SHADOW_PASS_ID 0 -#define RENDER_SHADOW_PASS_BIT (1<