mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 07:26:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			467 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			467 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "resources.hpp"
 | 
						|
 | 
						|
#include <components/vfs/pathutil.hpp>
 | 
						|
 | 
						|
namespace LuaUi
 | 
						|
{
 | 
						|
    std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
 | 
						|
    {
 | 
						|
        VFS::Path::normalizeFilenameInPlace(data.mPath);
 | 
						|
 | 
						|
        TextureResources& list = mTextures[data.mPath];
 | 
						|
        list.push_back(std::make_shared<TextureResource>(data));
 | 
						|
        return list.back();
 | 
						|
    }
 | 
						|
 | 
						|
    void ResourceManager::clear()
 | 
						|
    {
 | 
						|
        mTextures.clear();
 | 
						|
    }
 | 
						|
}
 |