mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-24 04:53:28 -04:00
Fixed vertexdecl cleanup.
This commit is contained in:
parent
00cd03d184
commit
d6bf810fb0
1 changed files with 10 additions and 1 deletions
11
src/bgfx_p.h
11
src/bgfx_p.h
|
@ -1890,6 +1890,15 @@ namespace bgfx
|
|||
}
|
||||
}
|
||||
|
||||
for (VertexDeclMap::iterator it = m_vertexDeclMap.begin(), itEnd = m_vertexDeclMap.end(); it != itEnd; ++it)
|
||||
{
|
||||
if (it->second.idx == declHandle.idx)
|
||||
{
|
||||
m_vertexDeclMap.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return declHandle;
|
||||
}
|
||||
|
||||
|
@ -2553,7 +2562,7 @@ namespace bgfx
|
|||
DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx];
|
||||
|
||||
VertexDeclHandle declHandle = m_declRef.release(dvb.m_handle);
|
||||
if (invalidHandle != declHandle.idx)
|
||||
if (isValid(declHandle) )
|
||||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
|
||||
cmdbuf.write(declHandle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue