mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
use the write buffer slot, instead of elementarray slot to create the
index buffer
This commit is contained in:
parent
d367f94d7c
commit
78a9fbb9b5
|
@ -763,7 +763,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
|
|||
|
||||
glBindVertexArray(0);
|
||||
glGenBuffers(1, &m_QuadDrawIndexBufferID);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_QuadDrawIndexBufferID);
|
||||
glBindBuffer(GL_COPY_WRITE_BUFFER, m_QuadDrawIndexBufferID);
|
||||
m_LastIndexBufferBound = 0;
|
||||
|
||||
unsigned int Indices[CCommandBuffer::MAX_VERTICES/4 * 6];
|
||||
|
@ -778,7 +778,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
|
|||
Indices[i+5] = Primq + 3;
|
||||
Primq+=4;
|
||||
}
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * CCommandBuffer::MAX_VERTICES/4 * 6, Indices, GL_STATIC_DRAW);
|
||||
glBufferData(GL_COPY_WRITE_BUFFER, sizeof(unsigned int) * CCommandBuffer::MAX_VERTICES/4 * 6, Indices, GL_STATIC_DRAW);
|
||||
|
||||
m_CurrentIndicesInBuffer = CCommandBuffer::MAX_VERTICES/4 * 6;
|
||||
|
||||
|
|
Loading…
Reference in a new issue