Remove destroyed uniform from hash map.

This commit is contained in:
Branimir Karadžić 2015-02-17 17:08:08 -08:00
parent 3838492e8d
commit 1295de90ea

View file

@ -2906,6 +2906,15 @@ namespace bgfx
if (0 == refs)
{
for (UniformHashMap::iterator it = m_uniformHashMap.begin(), itEnd = m_uniformHashMap.end(); it != itEnd; ++it)
{
if (it->second.idx == _handle.idx)
{
m_uniformHashMap.erase(it);
break;
}
}
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyUniform);
cmdbuf.write(_handle);
m_submit->free(_handle);