|
@@ -294,8 +294,12 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
|
|
bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
|
|
|
|
|
|
|
|
// Set views.
|
|
// 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::setViewRect(2, 0, 0, 128, 128);
|
|
|
bgfx::setViewFrameBuffer(2, lum[0]);
|
|
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);
|
|
bx::mtxOrtho(proj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f);
|
|
|
|
|
|
|
|
// Set view and projection matrix for view 0.
|
|
// 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 at[3] = { 0.0f, 1.0f, 0.0f };
|
|
|
float eye[3] = { 0.0f, 1.0f, -2.5f };
|
|
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);
|
|
bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f);
|
|
|
|
|
|
|
|
// Set view and projection matrix for view 1.
|
|
// Set view and projection matrix for view 1.
|
|
|
- bgfx::setViewTransformMask(1<<1, view, proj);
|
|
|
|
|
|
|
+ bgfx::setViewTransform(1, view, proj);
|
|
|
|
|
|
|
|
bgfx::setUniform(u_mtx, mtx);
|
|
bgfx::setUniform(u_mtx, mtx);
|
|
|
|
|
|