mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Make reportStats const
This commit is contained in:
parent
5fb854036d
commit
051c17a184
21 changed files with 23 additions and 23 deletions
|
@ -39,7 +39,7 @@ osg::ref_ptr<ESMTerrain::LandObject> LandManager::getLand(int x, int y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LandManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void LandManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Land", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Land", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace MWRender
|
||||||
/// @note Will return NULL if not found.
|
/// @note Will return NULL if not found.
|
||||||
osg::ref_ptr<ESMTerrain::LandObject> getLand(int x, int y);
|
osg::ref_ptr<ESMTerrain::LandObject> getLand(int x, int y);
|
||||||
|
|
||||||
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int mLoadFlags;
|
int mLoadFlags;
|
||||||
|
|
|
@ -907,7 +907,7 @@ namespace MWRender
|
||||||
mStateUpdater->setFogColor(color);
|
mStateUpdater->setFogColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::reportStats()
|
void RenderingManager::reportStats() const
|
||||||
{
|
{
|
||||||
osg::Stats* stats = mViewer->getViewerStats();
|
osg::Stats* stats = mViewer->getViewerStats();
|
||||||
unsigned int frameNumber = mViewer->getFrameStamp()->getFrameNumber();
|
unsigned int frameNumber = mViewer->getFrameStamp()->getFrameNumber();
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace MWRender
|
||||||
void updateAmbient();
|
void updateAmbient();
|
||||||
void setFogColor(const osg::Vec4f& color);
|
void setFogColor(const osg::Vec4f& color);
|
||||||
|
|
||||||
void reportStats();
|
void reportStats() const;
|
||||||
|
|
||||||
osg::ref_ptr<osgViewer::Viewer> mViewer;
|
osg::ref_ptr<osgViewer::Viewer> mViewer;
|
||||||
osg::ref_ptr<osg::Group> mRootNode;
|
osg::ref_ptr<osg::Group> mRootNode;
|
||||||
|
|
|
@ -185,7 +185,7 @@ void BulletShapeManager::updateCache(double referenceTime)
|
||||||
mInstanceCache->removeUnreferencedObjectsInCache();
|
mInstanceCache->removeUnreferencedObjectsInCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BulletShapeManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void BulletShapeManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Shape", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Shape", mCache->getCacheSize());
|
||||||
stats->setAttribute(frameNumber, "Shape Instance", mInstanceCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Shape Instance", mInstanceCache->getCacheSize());
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace Resource
|
||||||
/// @see ResourceManager::updateCache
|
/// @see ResourceManager::updateCache
|
||||||
virtual void updateCache(double referenceTime);
|
virtual void updateCache(double referenceTime);
|
||||||
|
|
||||||
void reportStats(unsigned int frameNumber, osg::Stats *stats);
|
void reportStats(unsigned int frameNumber, osg::Stats *stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
osg::ref_ptr<BulletShapeInstance> createInstance(const std::string& name);
|
osg::ref_ptr<BulletShapeInstance> createInstance(const std::string& name);
|
||||||
|
|
|
@ -141,7 +141,7 @@ namespace Resource
|
||||||
return mWarningImage;
|
return mWarningImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void ImageManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Image", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Image", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Resource
|
||||||
|
|
||||||
osg::Image* getWarningImage();
|
osg::Image* getWarningImage();
|
||||||
|
|
||||||
void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
osg::ref_ptr<osg::Image> mWarningImage;
|
osg::ref_ptr<osg::Image> mWarningImage;
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace Resource
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyframeManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void KeyframeManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Keyframe", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Keyframe", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Resource
|
||||||
/// @note Throws an exception if the resource is not found.
|
/// @note Throws an exception if the resource is not found.
|
||||||
osg::ref_ptr<const NifOsg::KeyframeHolder> get(const std::string& name);
|
osg::ref_ptr<const NifOsg::KeyframeHolder> get(const std::string& name);
|
||||||
|
|
||||||
void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Resource
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NifFileManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void NifFileManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Nif", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Nif", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Resource
|
||||||
/// to be done in advance by other managers accessing the NifFileManager.
|
/// to be done in advance by other managers accessing the NifFileManager.
|
||||||
Nif::NIFFilePtr get(const std::string& name);
|
Nif::NIFFilePtr get(const std::string& name);
|
||||||
|
|
||||||
void reportStats(unsigned int frameNumber, osg::Stats *stats);
|
void reportStats(unsigned int frameNumber, osg::Stats *stats) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Resource
|
||||||
|
|
||||||
const VFS::Manager* getVFS() const;
|
const VFS::Manager* getVFS() const;
|
||||||
|
|
||||||
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) {}
|
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const VFS::Manager* mVFS;
|
const VFS::Manager* mVFS;
|
||||||
|
|
|
@ -85,9 +85,9 @@ namespace Resource
|
||||||
return mVFS;
|
return mVFS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceSystem::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void ResourceSystem::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
for (std::vector<ResourceManager*>::iterator it = mResourceManagers.begin(); it != mResourceManagers.end(); ++it)
|
for (std::vector<ResourceManager*>::const_iterator it = mResourceManagers.begin(); it != mResourceManagers.end(); ++it)
|
||||||
(*it)->reportStats(frameNumber, stats);
|
(*it)->reportStats(frameNumber, stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace Resource
|
||||||
/// @note May be called from any thread.
|
/// @note May be called from any thread.
|
||||||
const VFS::Manager* getVFS() const;
|
const VFS::Manager* getVFS() const;
|
||||||
|
|
||||||
void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<SceneManager> mSceneManager;
|
std::auto_ptr<SceneManager> mSceneManager;
|
||||||
|
|
|
@ -703,7 +703,7 @@ namespace Resource
|
||||||
mSharedStateMutex.unlock();
|
mSharedStateMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*mIncrementalCompileOperation->getToCompiledMutex());
|
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*mIncrementalCompileOperation->getToCompiledMutex());
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace Resource
|
||||||
/// @see ResourceManager::updateCache
|
/// @see ResourceManager::updateCache
|
||||||
virtual void updateCache(double referenceTime);
|
virtual void updateCache(double referenceTime);
|
||||||
|
|
||||||
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ namespace Resource
|
||||||
osg::ref_ptr<MultiObjectCache> mInstanceCache;
|
osg::ref_ptr<MultiObjectCache> mInstanceCache;
|
||||||
|
|
||||||
osg::ref_ptr<Resource::SharedStateManager> mSharedStateManager;
|
osg::ref_ptr<Resource::SharedStateManager> mSharedStateManager;
|
||||||
OpenThreads::Mutex mSharedStateMutex;
|
mutable OpenThreads::Mutex mSharedStateMutex;
|
||||||
|
|
||||||
Resource::ImageManager* mImageManager;
|
Resource::ImageManager* mImageManager;
|
||||||
Resource::NifFileManager* mNifFileManager;
|
Resource::NifFileManager* mNifFileManager;
|
||||||
|
|
|
@ -71,7 +71,7 @@ void ChunkManager::setShaderManager(Shader::ShaderManager *shaderManager)
|
||||||
mShaderManager = shaderManager;
|
mShaderManager = shaderManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChunkManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void ChunkManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Terrain Chunk", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Terrain Chunk", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace Terrain
|
||||||
// Optional
|
// Optional
|
||||||
void setShaderManager(Shader::ShaderManager* shaderManager);
|
void setShaderManager(Shader::ShaderManager* shaderManager);
|
||||||
|
|
||||||
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
osg::ref_ptr<osg::Node> createChunk(float size, const osg::Vec2f& center);
|
osg::ref_ptr<osg::Node> createChunk(float size, const osg::Vec2f& center);
|
||||||
|
|
|
@ -54,7 +54,7 @@ osg::ref_ptr<osg::Texture2D> TextureManager::getTexture(const std::string &name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureManager::reportStats(unsigned int frameNumber, osg::Stats *stats)
|
void TextureManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const
|
||||||
{
|
{
|
||||||
stats->setAttribute(frameNumber, "Terrain Texture", mCache->getCacheSize());
|
stats->setAttribute(frameNumber, "Terrain Texture", mCache->getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Terrain
|
||||||
|
|
||||||
osg::ref_ptr<osg::Texture2D> getTexture(const std::string& name);
|
osg::ref_ptr<osg::Texture2D> getTexture(const std::string& name);
|
||||||
|
|
||||||
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats);
|
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Resource::SceneManager* mSceneManager;
|
Resource::SceneManager* mSceneManager;
|
||||||
|
|
Loading…
Reference in a new issue