|
|
@@ -183,6 +183,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
// Set view and projection matrix for view 0.
|
|
|
bgfx::setViewTransform(0, view, proj);
|
|
|
|
|
|
+ int64_t timeOffset = bx::getHPCounter();
|
|
|
+
|
|
|
while (!processEvents(width, height, debug, reset) )
|
|
|
{
|
|
|
// Set view 0 default viewport.
|
|
|
@@ -199,14 +201,14 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
const double freq = double(bx::getHPFrequency() );
|
|
|
const double toMs = 1000.0/freq;
|
|
|
|
|
|
+ float time = (float)( (now-timeOffset)/double(bx::getHPFrequency() ) );
|
|
|
+
|
|
|
// Use debug font to print information about this example.
|
|
|
bgfx::dbgTextClear();
|
|
|
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/01-cube");
|
|
|
bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Rendering simple static mesh.");
|
|
|
bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
|
|
|
|
|
|
- float time = (float)(bx::getHPCounter()/double(bx::getHPFrequency() ) );
|
|
|
-
|
|
|
// Submit 11x11 cubes.
|
|
|
for (uint32_t yy = 0; yy < 11; ++yy)
|
|
|
{
|