|
|
@@ -172,6 +172,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
bgfx::destroyVertexShader(vsh);
|
|
|
bgfx::destroyFragmentShader(fsh);
|
|
|
|
|
|
+ int64_t timeOffset = bx::getHPCounter();
|
|
|
+
|
|
|
while (!processEvents(width, height, debug, reset) )
|
|
|
{
|
|
|
// Set view 0 default viewport.
|
|
|
@@ -187,6 +189,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
last = now;
|
|
|
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();
|
|
|
@@ -205,8 +208,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|
|
// Set view and projection matrix for view 0.
|
|
|
bgfx::setViewTransform(0, view, proj);
|
|
|
|
|
|
- float time = (float)(bx::getHPCounter()/double(bx::getHPFrequency() ) );
|
|
|
-
|
|
|
const uint16_t instanceStride = 80;
|
|
|
const bgfx::InstanceDataBuffer* idb = bgfx::allocInstanceDataBuffer(121, instanceStride);
|
|
|
if (NULL != idb)
|