1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00
OpenMW/components/resource/resourcesystem.cpp

49 lines
1.1 KiB
C++
Raw Normal View History

2015-03-26 18:02:51 +01:00
#include "resourcesystem.hpp"
#include "scenemanager.hpp"
#include "texturemanager.hpp"
#include "niffilemanager.hpp"
2015-03-26 18:02:51 +01:00
namespace Resource
{
ResourceSystem::ResourceSystem(const VFS::Manager *vfs)
: mVFS(vfs)
{
mNifFileManager.reset(new NifFileManager(vfs));
mTextureManager.reset(new TextureManager(vfs));
mSceneManager.reset(new SceneManager(vfs, mTextureManager.get(), mNifFileManager.get()));
2015-03-26 18:02:51 +01:00
}
2015-05-08 17:52:35 +02:00
ResourceSystem::~ResourceSystem()
{
// this has to be defined in the .cpp file as we can't delete incomplete types
}
2015-03-26 18:02:51 +01:00
SceneManager* ResourceSystem::getSceneManager()
{
return mSceneManager.get();
}
2015-04-17 01:23:37 +02:00
TextureManager* ResourceSystem::getTextureManager()
{
return mTextureManager.get();
}
NifFileManager *ResourceSystem::getNifFileManager()
{
return mNifFileManager.get();
}
void ResourceSystem::clearCache()
{
mNifFileManager->clearCache();
}
2015-03-26 18:02:51 +01:00
const VFS::Manager* ResourceSystem::getVFS() const
{
return mVFS;
}
}