mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
invalidate all index buffer bindigs, when index buffer is resized
This commit is contained in:
parent
c22af4bb4d
commit
d367f94d7c
|
@ -761,6 +761,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
|
|||
m_TextureSlotBoundToUnit[i].m_TextureSlot = -1;
|
||||
}
|
||||
|
||||
glBindVertexArray(0);
|
||||
glGenBuffers(1, &m_QuadDrawIndexBufferID);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_QuadDrawIndexBufferID);
|
||||
m_LastIndexBufferBound = 0;
|
||||
|
@ -1159,6 +1160,11 @@ void CCommandProcessorFragment_OpenGL3_3::AppendIndices(unsigned int NewIndicesC
|
|||
glDeleteBuffers(1, &m_QuadDrawIndexBufferID);
|
||||
m_QuadDrawIndexBufferID = NewIndexBufferID;
|
||||
|
||||
m_LastIndexBufferBound = 0;
|
||||
for (size_t i = 0; i < m_VisualObjects.size(); ++i) {
|
||||
m_VisualObjects[i].m_LastIndexBufferBound = 0;
|
||||
}
|
||||
|
||||
m_CurrentIndicesInBuffer = NewIndicesCount;
|
||||
delete[] Indices;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue