mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Report loading screens to osg stats
This commit is contained in:
parent
739ff70a82
commit
a920ca9070
@ -343,7 +343,12 @@ namespace MWGui
|
|||||||
|
|
||||||
MWBase::Environment::get().getInputManager()->update(0, true, true);
|
MWBase::Environment::get().getInputManager()->update(0, true, true);
|
||||||
|
|
||||||
mResourceSystem->reportStats(mViewer->getFrameStamp()->getFrameNumber(), mViewer->getViewerStats());
|
osg::Stats* const stats = mViewer->getViewerStats();
|
||||||
|
const unsigned frameNumber = mViewer->getFrameStamp()->getFrameNumber();
|
||||||
|
|
||||||
|
stats->setAttribute(frameNumber, "Loading", 1);
|
||||||
|
|
||||||
|
mResourceSystem->reportStats(frameNumber, stats);
|
||||||
if (osgUtil::IncrementalCompileOperation* ico = mViewer->getIncrementalCompileOperation())
|
if (osgUtil::IncrementalCompileOperation* ico = mViewer->getIncrementalCompileOperation())
|
||||||
{
|
{
|
||||||
ico->setMinimumTimeAvailableForGLCompileAndDeletePerFrame(1.f / getTargetFrameRate());
|
ico->setMinimumTimeAvailableForGLCompileAndDeletePerFrame(1.f / getTargetFrameRate());
|
||||||
|
@ -54,6 +54,7 @@ namespace Resource
|
|||||||
constexpr std::string_view firstPage[] = {
|
constexpr std::string_view firstPage[] = {
|
||||||
"FrameNumber",
|
"FrameNumber",
|
||||||
"",
|
"",
|
||||||
|
"Loading",
|
||||||
"Compiling",
|
"Compiling",
|
||||||
"WorkQueue",
|
"WorkQueue",
|
||||||
"WorkThread",
|
"WorkThread",
|
||||||
@ -75,7 +76,6 @@ namespace Resource
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(std::size(firstPage) == itemsPerPage);
|
static_assert(std::size(firstPage) == itemsPerPage);
|
||||||
|
Loading…
Reference in New Issue
Block a user