void TextureLodScheduler::textureRegistered(ProviderPtr data) { auto resourceIt = _textureResources.find(data->uuid()); TextureResourceInfo* resource = nullptr; if (resourceIt == _textureResources.end()) { auto& resourceBase = registerResource(data); auto newResourceIt = _textureResources.insert(std::make_pair( resourceBase.uuid(), TextureResourceInfo() )); auto& newResource = newResourceIt.first->second; newResource.base = &resourceBase; resource = &newResource; } else { resource = &resourceIt->second; } }
inline const std::string& uuid() const { return data->uuid(); }