2017-03-06 15:32:56 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_TERRAIN_TEXTUREMANAGER_H
|
|
|
|
#define OPENMW_COMPONENTS_TERRAIN_TEXTUREMANAGER_H
|
|
|
|
|
|
|
|
#include <components/resource/resourcemanager.hpp>
|
2024-09-18 22:36:45 +00:00
|
|
|
#include <components/vfs/pathutil.hpp>
|
2017-03-06 15:32:56 +00:00
|
|
|
|
|
|
|
namespace Resource
|
|
|
|
{
|
|
|
|
class SceneManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Texture2D;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Terrain
|
|
|
|
{
|
|
|
|
|
|
|
|
class TextureManager : public Resource::ResourceManager
|
|
|
|
{
|
|
|
|
public:
|
2023-09-09 17:29:26 +00:00
|
|
|
explicit TextureManager(Resource::SceneManager* sceneMgr, double expiryDelay);
|
2017-03-06 15:32:56 +00:00
|
|
|
|
|
|
|
void updateTextureFiltering();
|
|
|
|
|
2024-09-18 22:36:45 +00:00
|
|
|
osg::ref_ptr<osg::Texture2D> getTexture(VFS::Path::NormalizedView name);
|
2017-03-06 15:32:56 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void reportStats(unsigned int frameNumber, osg::Stats* stats) const override;
|
2017-03-06 15:32:56 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Resource::SceneManager* mSceneManager;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|