예제 #1
0
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;
    }
}
예제 #2
0
 inline
 const std::string&
 uuid() const
 {
     return data->uuid();
 }