0

i wrote a resourcemanager which contains AssedtIDs, which are handles to the assets. For example for textures.

So something like that:

class ResourceManager{

std::map<std::string, AssetID> images;

getAsset();
....
}
class AssetID{
std::string path;
getTexture();
}

Now if the picture in the database is changing while runtime, i want the new picture with the old assetid. I made an observerclass which warns me if the database changed. One solution which came into my mind was to iterate through all IDs and check if the link is broke. But than i thought about the usecase that the path is the same but the picture is different, but the old texture is already loaded.

Maybe someone knows an engine which has to handle this problem. Because my only idea is to decode all textures and check if they are the same as the old ones

Klotz Großer
  • 73
  • 1
  • 1
  • 7

0 Answers0