mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
fixed last commit
This commit is contained in:
parent
c86ebb34df
commit
a7574f75d2
|
@ -80,13 +80,18 @@ void CGraphics_Threaded::FlushVertices()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_copy(Cmd.m_pVertices, m_aVertices, sizeof(CCommandBuffer::SVertex)*NumVerts);
|
|
||||||
|
|
||||||
// check if we have enough free memory in the commandbuffer
|
// check if we have enough free memory in the commandbuffer
|
||||||
if(!m_pCommandBuffer->AddCommand(Cmd))
|
if(!m_pCommandBuffer->AddCommand(Cmd))
|
||||||
{
|
{
|
||||||
// kick command buffer and try again
|
// kick command buffer and try again
|
||||||
KickCommandBuffer();
|
KickCommandBuffer();
|
||||||
|
|
||||||
|
Cmd.m_pVertices = (CCommandBuffer::SVertex *)m_pCommandBuffer->AllocData(sizeof(CCommandBuffer::SVertex)*NumVerts);
|
||||||
|
if(Cmd.m_pVertices == 0x0)
|
||||||
|
{
|
||||||
|
dbg_msg("graphics", "failed to allocate data for vertices");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!m_pCommandBuffer->AddCommand(Cmd))
|
if(!m_pCommandBuffer->AddCommand(Cmd))
|
||||||
{
|
{
|
||||||
|
@ -94,6 +99,8 @@ void CGraphics_Threaded::FlushVertices()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mem_copy(Cmd.m_pVertices, m_aVertices, sizeof(CCommandBuffer::SVertex)*NumVerts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGraphics_Threaded::AddVertices(int Count)
|
void CGraphics_Threaded::AddVertices(int Count)
|
||||||
|
|
Loading…
Reference in a new issue