restructure render loop to correct timings and expose FFI methods for setBoneTransform/setMorphWeights

This commit is contained in:
Nick Fisher
2023-11-20 11:35:50 +08:00
parent f0683b0b24
commit a24f56b31a
9 changed files with 167 additions and 24 deletions

View File

@@ -962,6 +962,7 @@ namespace polyvox
double _elapsed = 0;
int _frameCount = 0;
int _skippedFrames = 0;
void FilamentViewer::render(
uint64_t frameTimeInNanos,
@@ -981,6 +982,7 @@ namespace polyvox
// Log("1 sec average for asset animation update %f", _elapsed / 60);
_elapsed = 0;
_frameCount = 0;
Log("Skipped frames : %d", _skippedFrames);
}
Timer tmr;
@@ -1023,6 +1025,8 @@ namespace polyvox
}
else
{
_skippedFrames++;
// std::cout << "Skipped" << std::endl;
// skipped frame
}